Last modified: 2011-03-13 18:06:44 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 1661 - <br clear=(all|left|right|none)> breaks XHTML compilance
<br clear=(all|left|right|none)> breaks XHTML compilance
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.5.x
Other All
: Lowest blocker with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
: parser, patch
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-03-08 18:24 UTC by Ævar Arnfjörð Bjarmason
Modified: 2011-03-13 18:06 UTC (History)
0 users

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


Attachments
The patch against includes/Parser.php (723 bytes, patch)
2005-03-08 18:25 UTC, Ævar Arnfjörð Bjarmason
Details
The patch against includes/Parser.php (for REL1_4) (736 bytes, patch)
2005-03-08 18:29 UTC, Ævar Arnfjörð Bjarmason
Details
A testcase for the regular expression (509 bytes, text/plain)
2005-03-08 18:32 UTC, Ævar Arnfjörð Bjarmason
Details

Description Ævar Arnfjörð Bjarmason 2005-03-08 18:24:06 UTC
using <br clear=all> breaks XHTML compilance. This patch fixes the issue.
Comment 1 Ævar Arnfjörð Bjarmason 2005-03-08 18:25:24 UTC
Created attachment 352 [details]
The patch against includes/Parser.php

A patch for HEAD.
Comment 2 Ævar Arnfjörð Bjarmason 2005-03-08 18:29:24 UTC
Created attachment 353 [details]
The patch against includes/Parser.php (for REL1_4)

The patch against REL1_4.
Comment 3 Ævar Arnfjörð Bjarmason 2005-03-08 18:32:50 UTC
Created attachment 354 [details]
A testcase for the regular expression

A testcase for the expression.
Comment 4 Brion Vibber 2005-03-08 22:13:40 UTC
Several things wrong with this patch:

First, it does not appear to be notice-clean. With error_reporting set to E_ALL, 
notices will be displayed about the use of undefined constants.

Second, it will fail to pick up any <br> containing additional attributes (for 
instance, an id or a style attribute) so it is insufficient. 

Third, it gratuitously transforms the clear attribute to an inline style. This is 
unnecessary for our XHTML 1.0 Transitional target. (If it were necessary, it would 
also be necessary to be able to merge it with a specified style attribute if present.)

Consider instead working on Sanitizer.php to have the HTML sanitizer output the 
/> automatically on manditorily-closed empty elements.
Comment 5 Ævar Arnfjörð Bjarmason 2005-03-08 22:33:27 UTC
1. It isn't, I didn't test it for that.

2. No it won't, it was designed for this specific case and you're right, it's
insufficient.

3. This is what currently happens if you type <br clear="both"/>, the wiki will
render <br style="clear: both;" />, however if you type <br clear="all" /> or
<br clear="all"> it will output what you gave it.

4. Sanitizer.php is probably better, any suggestions as to where to start?

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


Navigation
Links