W3C home > Mailing lists > Public > public-vocabs@w3.org > January 2013

Re: Does Schema strips nested tags within the 'itemprop="name"' element?

From: Stéphane Corlosquet <scorlosquet@gmail.com>
Date: Thu, 24 Jan 2013 18:03:55 -0500
Message-ID: <CAGR+nnH15Oqq_r0zS2qf4TC2RyhS_j_ijxr+YavRPcXN7Wt57A@mail.gmail.com>
To: Carey Lew <carey.lew@gmail.com>
Cc: public-vocabs@w3.org
On Thu, Jan 24, 2013 at 2:24 PM, Carey Lew <carey.lew@gmail.com> wrote:

> If my website was setup to display my product name information as the
> following, is Schema smart enough to strip out the nested <br> tags and
> <span> tag?
> <h1 class="product-title" itemprop="name">
> 10 litre<br />
> rectangular bucket<br>
> <span>fingerprint-proof stainless</span>
> </h1>

Tags will be stripped out in microdata by default, yes, but not the
newlines from your HTML code. Thus, in JSON you would get the value:
\n10 litre\nrectangular bucket\nfingerprint-proof stainless\n

That said, it's something consumers might be able to cope with by cleaning
it up, http://www.google.com/webmasters/tools/richsnippets for example
seems to be able to display it correctly.

Received on Thursday, 24 January 2013 23:04:25 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:48:52 UTC