Page MenuHomePhabricator

Formatted empty <nowiki> shouldn't appear
Closed, ResolvedPublic

Description

Sometimes meaningless <nowiki> tags appear in edited pages - they have no actual content, and only some formatting. For example, you can see a useless '''''<nowiki/>''''' in this edit.

Such <nowiki> tags should be auto-discarded whenever possible.

(Also discussed at https://www.mediawiki.org/wiki/Talk:Parsoid/Normalizations#An_empty_nowiki_tag_without_anything_at_the_end_of_the_line )

Event Timeline

Amire80 raised the priority of this task from to Medium.
Amire80 updated the task description. (Show Details)
Amire80 added subscribers: Amire80, Arlolra.

Well, there's T115717 but this seems slightly different now.

Arlolra claimed this task.

This is handled by https://www.mediawiki.org/wiki/Parsoid/Normalizations#Strip_empty_headings_and_style_tags

For example,

> echo "<i><b></b></i>" | node bin/parse --html2wt
'''''<nowiki/>'''''

> echo "<i><b></b></i>" | node bin/parse --html2wt --scrubWikitext