Last modified: 2013-10-09 22:28:59 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T57531, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 55531 - Stray </noinclude> should be parsed to meta
Stray </noinclude> should be parsed to meta
Status: NEW
Product: Parsoid
Classification: Unclassified
token-stream transforms (Other open bugs)
unspecified
All All
: Normal normal
: ---
Assigned To: Gabriel Wicke
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-09 22:28 UTC by Gabriel Wicke
Modified: 2013-10-09 22:28 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Gabriel Wicke 2013-10-09 22:28:31 UTC
The PHP parser strips unopened </noinclude> tags. We should represent them as meta tags so that the rendering and round-tripping works correctly.

[subbu@earth lib] echo "foo<noinclude>bar baz" | node parse --fetchConfig false
<body data-parsoid='{"tmp":{},"dsr":[0,22,0,0]}'><p data-parsoid='{"dsr":[0,21,0,0]}'>foo<meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>","dsr":[3,14,null,null]}'>bar baz</p>
</body>
[subbu@earth lib] echo "foo</noinclude>bar baz" | node parse --fetchConfig false
<body data-parsoid='{"tmp":{},"dsr":[0,23,0,0]}'><p data-parsoid='{"dsr":[0,22,0,0]}'>foo&lt;/noinclude&gt;bar baz</p>
</body>
[subbu@earth lib] echo "foo</noinclude>bar baz" | node parse --fetchConfig false --trace peg-tokens
TOKS: ["foo",{"type":"EndTagTk","name":"noinclude","attribs":[],"dataAttribs":{"tsr":[3,15],"stx":"html"}},"bar baz"]
TOKS: [{"type":"NlTk","dataAttribs":{"tsr":[22,23]}},""]
TOKS: [{"type":"EOFTk"}]
<body data-parsoid='{"tmp":{},"dsr":[0,23,0,0]}'><p data-parsoid='{"dsr":[0,22,0,0]}'>foo&lt;/noinclude&gt;bar baz</p>
</body>

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links