Page MenuHomePhabricator

Parsoid closes unclosed <del> tag while Tidy doesn't
Closed, DeclinedPublic

Description

Parsoid version ([[https://hu.wikipedia.org/w/api.php?action=visualeditor&paction=parse&page=Wikip%C3%A9dia%3AJavaslatok+j%C3%B3+sz%C3%B3cikkekre%2FA+mes%C3%A9k+mes%C3%A9je&oldid=19163140|visualeditor API module result]]) closes unclosed <del> tag on end of paragraph, while the default page version (Tidy) doesn’t. It’s very confusing as the new wikitext editor uses Parsoid for preview, but the Tidy version appears after saving.

Event Timeline

This is not specific to Parsoid, but HTML5 vs HTML4. We are in the process of replacing Tidy with Remex (see https://www.mediawiki.org/wiki/Parsing/Replacing_Tidy/FAQ).

You can see that with Remex, the problem you see with Parsoid will show up as well.

https://hu.wikipedia.org/w/index.php?title=Wikip%C3%A9dia:Javaslatok_j%C3%B3_sz%C3%B3cikkekre/A_mes%C3%A9k_mes%C3%A9je&oldid=19163140&action=parsermigration-edit

The HTML5 spec ( https://www.w3.org/TR/2011/WD-html5-20110525/edits.html#the-del-element ) says that the del element should not cross (implied) paragraph boundaries. So, that is what Parsoid and RemexHTML do. So, the unclosed <del> tag gets closed at the end of the paragraph.

The right fix here is to update the wikitext to add these tags around every paragraph that needs them.