Last modified: 2012-10-25 17:40:13 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 T13748, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 11748 - Parser issue for HTML definition list
Parser issue for HTML definition list
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.11.x
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
http://semeb.com/dpldemo/index.php?ti...
:
: 24320 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-10-23 17:57 UTC by Barns
Modified: 2012-10-25 17:40 UTC (History)
7 users (show)

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


Attachments

Description Barns 2007-10-23 17:57:26 UTC
MW seems to be handling unproperly the HTML definitions tags.

Entering:
<DL>
<DT>my definition header</DT>
<DD>
<UL>
<LI>Cameroon</LI>
<LI>Nigeria</LI>
<LI>Somalia</LI>
<LI>Sudan</LI>
</UL>
</DD>
</DL>

Will result in some tags being rendered as html special chars and show up in article rendering.
Comment 1 Joshua C. Lerner 2008-05-09 16:15:41 UTC
I'm seeing this as well on 1.11.0 - but not on Wikipedia (1.13alpha (r34478)).
Comment 2 Aryeh Gregor (not reading bugmail, please e-mail directly) 2008-05-09 16:58:06 UTC
This has probably been fixed at some point since 1.11.0.  If you can reproduce in 1.12, or preferably 1.13alpha, please reopen.
Comment 3 dana 2011-01-05 02:35:03 UTC
I don't know if this was working in 1.12 through 1.15, but i am definitely experiencing this problem in 1.16.


Steps to reproduce:

1. Create new article, edit existing article, whatever.

2. In body of article, create a simple definition list using the HTML syntax (not the colons and semicolons). Something like the following:

<dl>
<dt>test 1</dt>
<dd>test test test test test</dd>
<dt>test 2</dt>
<dd>test test test test test</dd>
</dl>

3. Save article.


Expected results:

The code above should appear more or less verbatim in the final article source.


Actual results:

The final article source (as seen in View > Source) looks like this:

<dl>

<dt>test 1&lt;/dt&gt;
<dd>test test test test test&lt;/dd&gt;
<dt>test 2&lt;/dt&gt;
<dd>test test test test test&lt;/dd&gt;
</dl>

As you can see, it insists on converting the closing tags to plain text, which results in '</dt>' and so on appearing in the rendered article. White space doesn't seem to come into it (for example i can put everything on one line and the same issue occurs).

This problem also seems to affect the closing tags of other HTML elements *inside* more advanced DLs. For instance, i have a DL that contains <div><code>...</code></div>, and the closing tags for the code/div elements are rendered similarly to the above.

I have reproduced this on two different MediaWiki installations on DreamHost; one has a few extensions/modifications installed, but the other is pretty much vanilla (all extensions disabled, no core files modified, no fancy settings in place).

Product Version
MediaWiki 1.16.0
PHP 5.2.15 (cgi-fcgi)
MySQL 5.1.39-log
Comment 4 Aryeh Gregor (not reading bugmail, please e-mail directly) 2011-01-05 22:30:17 UTC
Cannot reproduce in 1.18alpha.  Can anyone else test in 1.16.0 and see if they get the same problem?  I suspect it's configuration-dependent.
Comment 5 Platonides 2011-01-05 22:45:36 UTC
Confirmed in 1.16.0, REL1_17 and trunk. Passes if you have $wgUseTidy = true. Added failing parser test in r79679.
Comment 6 Aryeh Gregor (not reading bugmail, please e-mail directly) 2011-01-05 23:03:26 UTC
Typical.  I wish we could kill $wgUseTidy.
Comment 7 Gabriel Wicke 2012-04-17 16:49:06 UTC
*** Bug 24320 has been marked as a duplicate of this bug. ***
Comment 8 Gabriel Wicke 2012-04-17 17:16:34 UTC
Fix pending in https://gerrit.wikimedia.org/r/#change,5174.
Comment 9 Antoine "hashar" Musso (WMF) 2012-10-25 17:40:13 UTC
Merged in, will be in MediaWiki 1.21.

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


Navigation
Links