Page MenuHomePhabricator

(Regression?) html2wt: <nowiki> strings present in input HTML aren't properly escaped
Closed, ResolvedPublic

Description

[subbu@earth tests] echo "<nowiki><i>foo</i></nowiki>" | node parse --html2wt
<nowiki>''foo''</nowiki>

That should have been

&lt;nowiki&gt;''foo''&lt;/nowiki&gt;

Given that there is a escapeNowikiTags in the serialization code, this feels like this could be a regression.

Event Timeline

ssastry raised the priority of this task from to Medium.
ssastry updated the task description. (Show Details)
ssastry added a project: Parsoid.
ssastry subscribed.

escapeNowikiTags is used only used on text, but this is interpreted as a tag, and serialized with WSP._serializeHTMLTag

Change 232231 had a related patch set uploaded (by Arlolra):
T109358: Escape serialized nowiki DOM elements

https://gerrit.wikimedia.org/r/232231

Change 232231 merged by jenkins-bot:
T109358: Escape serialized nowiki DOM elements

https://gerrit.wikimedia.org/r/232231