Last modified: 2012-12-16 09:53:45 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 T41502, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 39502 - <tag /> should be treated as <tag></tag>
<tag /> should be treated as <tag></tag>
Status: NEW
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.21.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-20 13:44 UTC by Michael M.
Modified: 2012-12-16 09:53 UTC (History)
1 user (show)

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


Attachments

Description Michael M. 2012-08-20 13:44:13 UTC
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.

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


Navigation
Links