Last modified: 2012-04-12 13:54:36 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 T30659, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 28659 - <code> is escaped inside <pre>
<code> is escaped inside <pre>
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.16.x
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-04-22 10:10 UTC by dana
Modified: 2012-04-12 13:54 UTC (History)
1 user (show)

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


Attachments

Description dana 2011-04-22 10:10:44 UTC
Hi there,

This seems like it should be a known issue since it's so obvious, but i could not find any information on it, and nobody on IRC seemed to know either. Sorry if this is redundant :)

The issue is basically as it says in the title: When <code>...</code> is included within a <pre>, MediaWiki escapes the former. For example:

<pre><code>    test</code></pre>

becomes

<code>    test</code>

This is not how it should work according to the W3C:

http://www.w3.org/TR/html401/struct/text.html#h-9.3.4

http://www.w3.org/TR/html5/grouping-content.html#the-pre-element

In fact, MediaWiki seems to escape *everything* inside <pre> (whilst the W3C indicates that there are only a handful of elements that are not allowed there) — making it essentially a white-space-preserving <nowiki>.

Is there a specific reason for this? Is it possible to change?

cheers
Comment 1 Niklas Laxström 2011-04-22 10:16:51 UTC
Wikimarkup is not html. If you want that behaviour use empty space at the beginning of the line.

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


Navigation
Links