2

I have recently tagged my 'events' pages on my site with microdata. Here's an example: http://www.semi-directory.com/semicon-china/g753

I confirmed the markup was correct by using Google's testing tool (http://www.google.com/webmasters/tools/richsnippets)

However, on the page with the updated markup, I have 2 random question marks appearing in the "location" section of the page:

Location : ? Shanghai New International Expo Centre ? Shanghai, China

Here is the (Classic ASP) code I used to generate this line in the HTML:

    <span style="font-weight: bold">Location : </span> 

​<span itemprop="location" itemscope itemtype="http://schema.org/Place">
    <span itemprop="name"><%=arrayEvent(20,0)%></span>

​<span itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
 <span itemprop="streetAddress"><%=arrayEvent(21,0)%></span>,
 <span itemprop="addressLocality"><%=arrayEvent(6,0)%></span>, 
 <span itemprop="addressCountry"><%=arrayEvent(7,0)%></span>
 </span>
</span>

As you can see, there are no question marks in the code. I have tried swapping the outer to but this doesn't fix it.

How do I get rid of these question marks in the rendered page?

Thanks!

2 Answers2

2

I copied your original code (by editing your question) and pasted it into notepad++ and the question marks are there. (see below)

Maybe your code editor is not showing you them?

If you are coping examples you can run into character encoding issues so you may have to clease the code by pasting into notepad for example and coping it from there.

    <span style="font-weight: bold">Location : </span> 

?<span itemprop="location" itemscope itemtype="http://schema.org/Place">
    <span itemprop="name"><%=arrayEvent(20,0)%></span>

?<span itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
 <span itemprop="streetAddress"><%=arrayEvent(21,0)%></span>,
 <span itemprop="addressLocality"><%=arrayEvent(6,0)%></span>, 
 <span itemprop="addressCountry"><%=arrayEvent(7,0)%></span>
 </span>
</span>
Nicholas Murray
  • 13,305
  • 14
  • 65
  • 84
1

I guess that your source code has some random non-printable characters in it. Maybe you copy-pasted an example that has Unix-style line breaks, and ASP chokes on these line break characters and displays them as question marks?

Try reformatting the code so that it's all on one line. If this makes the question marks go away, then you can insert new line breaks in your ASP editor (it will insert Windows-style line breaks).

At any rate, this has nothing to do with Microdata, it's just an ASP issue.

cygri
  • 9,412
  • 1
  • 25
  • 47