Last modified: 2007-08-13 23:25:58 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 T12901, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 10901 - Sanitizer damages block content (especially <ol>) in output when wrapped in <span>
Sanitizer damages block content (especially <ol>) in output when wrapped in <...
Status: RESOLVED DUPLICATE of bug 9737
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
unspecified
All All
: High major with 2 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
http://en.wikipedia.org/w/index.php?t...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-08-13 02:56 UTC by Danny
Modified: 2007-08-13 23:25 UTC (History)
2 users (show)

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


Attachments

Description Danny 2007-08-13 02:56:50 UTC
For some reason, the numbered list is showing the numbers 1, 3, 4, and 5, skipping the number 2.
Comment 1 Danny B. 2007-08-13 03:45:21 UTC
There's unclosed <span> tag right before the list. It's actually closed at the end of one before last paragraph. Rewrite "span" to "div" in both.

----

Although solution is simple, this is still a big bug.

I've done some observation and here are some clues for whoever will be fixing it:

* if the <span> is followed by <ol>, the output has unexplainable <li style="list-style: none"></li> as the second item of the list (= it adds one dummy item)

* each blocklevel tag within the wrong wrapping <span> which doesn't contain any other blocklevel tag is padded with the copy of the wrong wrapping tag, or rather each inline stuff is wrapped in the copy.

<span class="foo">
# 1
# 2
# 3
<div class="bar">
lorem
#1
#2
#3
abc<div class="quo">ipsum</div>def
</div>
</span>

produces

<ol>
<li><span class="foo">1</span></li>
<li style="list-style: none"></li>
<li><span class="foo">2</span></li>
<li><span class="foo">3</span></li>
</ol>
<div class="bar">
<p><span class="foo">lorem</span></p>
<ol>
<li><span class="foo">1</span></li>
<li style="list-style: none"></li>
<li><span class="foo">2</span></li>
<li><span class="foo">3</span></li>
</ol>
<span class="foo">abc</span>
<div class="quo"><span class="foo">ipsum</span></div>
<span class="foo">def</span></div>

----

Although this might have been some kind of help for bad-coding users to display things "properly" (rather visually properly), it is real pain. There should be absolutely no stuff added in output code this way, because it totally changes the DOM tree of page (so some scripts may not work) besides it raises up the output size of the page (imagine somebody will wrap entire page in this span).
Comment 2 Ilmari Karonen 2007-08-13 23:25:58 UTC

*** This bug has been marked as a duplicate of bug 9737 ***

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


Navigation
Links