bug - meta tag in body handled incorrectly

41 views
Skip to first unread message

pghjvan...@gmail.com

unread,
Nov 13, 2014, 8:06:33 AM11/13/14
to tagsoup...@googlegroups.com
Usage of the <meta> tag in a document body has become legal (see http://www.w3.org/TR/html5/document-metadata.html#the-meta-element ).
This is also used (slightly differently) with microdata (see examples in http://www.w3.org/TR/microdata/ ).

Tagsoup's behaviour when it encounters this pattern is (no longer) correct: it closes al parent elements including <body> and creates a new <head>. Example:

....
</div>
</div>
</div>
</body>
<head>
<meta content="..." itemprop="...." />
</head>
<body>
...

I worked around this using:

htmlSchema.elementType("meta", Schema.M_EMPTY, Schema.M_ANY, 0);

But I think it would be better if html.tssl were updated to reflect the new use of <meta>.

Thanks!

Josh

Reply all
Reply to author
Forward
0 new messages