Page MenuHomePhabricator

<tag /> should be treated as <tag></tag>
Closed, DeclinedPublic


Users who are more familiar with XML than with HTML often write things like
<div style="clear:left;" />
The parser (function removeHTMLtags in Sanitizer.php) currently does this:

  • If wgUseTidy is true, the pseudo-self-closed tag is left as is, and fixed by Tidy to <div style="clear:left;"></div> (or not, bug 38273)
  • If wgUseTidy is false, the tag is flagged as "bad" and escaped to &lt;div style="clear:left;" /&gt;

This is inconsistent, and makes it difficult to import text from a wiki with Tidy into a wiki without.
So self-closed tags that should be in pairs should be closed automatically by the parser. The current behavior was introduced as fix for bug 5487.

Version: 1.21.x
Severity: normal



Event Timeline

bzimport raised the priority of this task from to Normal.Nov 22 2014, 12:59 AM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz39502.
bzimport added a subscriber: Unknown Object (MLST).
Schnark created this task.Aug 20 2012, 1:44 PM
Schnark closed this task as Declined.Aug 16 2016, 10:16 AM

Marking as declined in favor of T134423.