Last modified: 2014-10-17 10:46:07 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 T11737, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 9737 - Tidy sometimes goes ballistic when a block-level element is wrapped in an inline element
Tidy sometimes goes ballistic when a block-level element is wrapped in an inl...
Status: REOPENED
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
unspecified
All All
: Low trivial (vote)
: ---
Assigned To: Nobody - You can work on this!
http://en.wikipedia.org/wiki/User:Sim...
: patch, testme, upstream
: 10077 10901 16815 72172 (view as bug list)
Depends on: 54616 71962
Blocks: tidy
  Show dependency treegraph
 
Reported: 2007-04-30 05:47 UTC by Steve Bennett
Modified: 2014-10-17 10:46 UTC (History)
9 users (show)

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


Attachments
Patch to Parser::doBlockLevels() to put newlines after close tags, to work around a bug in Tidy (5.90 KB, patch)
2007-08-15 19:52 UTC, Ilmari Karonen
Details
screenshot of resulting page, should have shown 3 bullet points (11.32 KB, image/png)
2011-11-09 19:53 UTC, Sumana Harihareswara
Details

Description Steve Bennett 2007-04-30 05:47:18 UTC
Witnessed with Firefox 2.0.0.1 on XP:
http://en.wikipedia.org/w/index.php?title=List_of_poker_terms&oldid=127060338

The definition for Fifth Street renders as follows:
fifth street

   1. The last card dealt to the board in community card games. Also "river".
   2.
   3. The fifth card dealt to each player in stud poker.
(actually I don't see the 2., but when I copy/paste, it appears). Compare the
source code:

<span id="fifth street">
; fifth street
# The last card dealt to the board in community card games. Also "[[River
(poker)|river]]".
# The fifth card dealt to each player in stud poker.
</span>
Comment 1 Aryeh Gregor (not reading bugmail, please e-mail directly) 2007-04-30 17:04:08 UTC
I have a writeup at [[User:Simetrical/9737]].  The behavior is rather bizarre,
but I doubt we want to hack Tidy to fix it.  Maybe if there's a configuration
option or something, marginally, but the bottom line should be don't wrap block
elements like lists in inline elements like <span> (use <div> instead).  Tidy
will try to make sense of it, but it's going to be an uphill battle, and you'll
have some screwed up results like this in particular cases.  (The exact trigger
case, incidentally, is an ordered list wrapped in an inline-level element with
an id.  Remove the id, or use anything but an ordered list, and you'll have no
visible strangeness.)

Not our bug, not reasonably fixable by us given its lack of severity, INVALID.
Comment 2 Aryeh Gregor (not reading bugmail, please e-mail directly) 2007-05-31 03:31:07 UTC
*** Bug 10077 has been marked as a duplicate of this bug. ***
Comment 3 Aryeh Gregor (not reading bugmail, please e-mail directly) 2007-05-31 03:31:56 UTC
Also sometimes happens with <font color=...>, per bug 10077.  URL updated.  The same resolution reason applies.
Comment 4 Ilmari Karonen 2007-08-13 23:25:58 UTC
*** Bug 10901 has been marked as a duplicate of this bug. ***
Comment 5 MZMcBride 2007-08-13 23:47:43 UTC
Did anyone contact the developers of HTML Tidy?
Comment 6 Ilmari Karonen 2007-08-14 14:33:04 UTC
After trying unsuccessfully for quite some time to reproduce this bug outside MediaWiki (so that I could report it to the Tidy developers), I finally discovered that the bug is triggered by the presence of a newline at the end of the first list item(!).  That is, the following input to Tidy triggers the bug:

  <span id="xxx">
  <ol><li>Foo
  </li><li>Bar</li></ol>

...but the following doesn't:

  <span id="xxx">
  <ol><li>Foo</li><li>Bar</li></ol>

Thus, we probably _could_ work around it fairly easily by modifying Parser::doBlockLevels() so that the newline gets removed or moved after the </li>.  Reopening in light of this.
Comment 7 Ilmari Karonen 2007-08-14 15:11:39 UTC
Submitted to the HTML Tidy bug tracker as [http://sourceforge.net/tracker/index.php?func=detail&aid=1773932&group_id=27659&atid=390963].
Comment 8 Ilmari Karonen 2007-08-15 19:52:02 UTC
Created attachment 4000 [details]
Patch to Parser::doBlockLevels() to put newlines after close tags, to work around a bug in Tidy

I've made a quick parser patch that I believe should work around the bug.  Some might even argue that it actually makes the output prettier.  The reason I haven't committed it yet is that the change breaks about 390 parsertests, and I'm not _quite_ completely and absolutely certain yet that all of those are false alarms.  Even if they are, the test cases would still need to be updated.
Comment 9 MZMcBride 2007-08-27 02:22:26 UTC
The Tidy bug tracker (http://sourceforge.net/tracker/index.php?func=detail&aid=1773932&group_id=27659&atid=390963) says that this issue has been fixed in the CVS.
Comment 10 Danny B. 2008-12-30 18:15:58 UTC
*** Bug 16815 has been marked as a duplicate of this bug. ***
Comment 11 Markus Krötzsch 2009-02-09 15:40:54 UTC
*** Bug 17417 has been marked as a duplicate of this bug. ***
Comment 12 Chad H. 2009-08-12 00:43:43 UTC
Adding upstream keyword since that's what it is :)

Adding testme...has this indeed been fixed in released versions since #comment 9 (I would assume so)?
Comment 13 p858snake 2011-04-30 00:09:26 UTC
*Bulk BZ Change: +Patch to open bugs with patches attached that are missing the keyword*
Comment 14 Sumana Harihareswara 2011-11-09 19:53:08 UTC
Created attachment 9405 [details]
screenshot of resulting page, should have shown 3 bullet points

The original steps-to-reproduce now show up as shown, so there's still a problem (if we want that formatting to work).

https://www.mediawiki.org/w/index.php?title=Sandbox&oldid=452753
Comment 15 Pravin 2014-09-24 15:26:01 UTC
This seems to be problem with IE only.

When I write:
 
#One
#Two
#Three
 
<font color=red>
#One
#Two
#Three
</font>
 
I see (screenshot in Firefox 32.0.2 on Win7):
 

 
and (screenshot in IE 8.0.7601 on Win7)
 

 
And when I copy and paste, I see:
One
Two
Three
One
 
Two
Three



============ Edited using below  =========

Interesting Wiki Bug (look at the automatic numbering):

#One
#Two
#Three

<font color=red>
#One
#Two
#Three
</font>


BUG

# One
# Two
# Three

SPAN
<span style="color: blue>
# One
# Two
# Three
</span>


DIV

<div style="color:#0000FF">
# One
# Two
# Three
</div>


Workaround

<font color=red>
# One
#:
# Two
#:
# Three
</font>

<font color=blue>
# One
#: 
# Two
# Three
</font>



# One
# Two
# Three

PRE

<pre style="color: red">
# One
# Two
# Three
</pre>
Comment 16 Andre Klapper 2014-10-17 10:46:07 UTC
*** Bug 72172 has been marked as a duplicate of this bug. ***

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


Navigation
Links