Page MenuHomePhabricator

Parsoid generated <link> nodes shouldn't be in <body>
Closed, ResolvedPublic

Description

In this article for example:
http://parsoid.wmflabs.org/enwikivoyage/South_America

You have this node in the the <body>:
<link rel="mw:PageProp/Category" href="./Category:Has_custom_banner" data-parsoid='{"stx":"simple","a":{"href":"./Category:Has_custom_banner"},"sa":{"href":"Category:Has custom banner"}}'/>

This is pretty odd because:

  • This is a "metadata" which shouldn't be mixed with rendered data
  • <link> nodes should be in the <head>, according the W3C ("The LINK element may only appear in the head of a document."):http://www.w3.org/TR/html401/struct/links.html

Version: unspecified
Severity: normal

Details

Reference
bz56515

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:32 AM
bzimport added a project: Parsoid.
bzimport set Reference to bz56515.
  • We are using HTML5+RDFa, which allows link in the body [1].
  • I agree with you that invisible metadata like this should not be in the body. We plan to move it into separate page properties, see bug 53508. Until this move is also done wikitext we'll still have to preserve the position of the metadata within the DOM so that we can round-trip it properly.

[1]: http://www.w3.org/TR/rdfa-in-html/

  • This bug has been marked as a duplicate of bug 53508 ***