r32375 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r32374‎ | r32375 | r32376 >
Date:18:32, 24 March 2008
Author:brion
Status:old
Tags:
Comment:
* (bug 11874) Inline CSS with !important no longer borken
Patch by Nicolas Dumazet - https://bugzilla.wikimedia.org/attachment.cgi?id=4754
Plus parser test case
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Parser.php (modified) (history)
  • /trunk/phase3/maintenance/parserTests.txt (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/parserTests.txt
@@ -4530,6 +4530,25 @@
45314531 #
45324532
45334533 !! test
 4534+Punctuation: nbsp before exclamation
 4535+!! input
 4536+C'est grave !
 4537+!! result
 4538+<p>C'est grave&nbsp;!
 4539+</p>
 4540+!! end
 4541+
 4542+!! test
 4543+Punctuation: CSS !important (bug 11874)
 4544+!! input
 4545+<div style="width:50% !important">important</div>
 4546+!! result
 4547+<div style="width:50% !important">important</div>
 4548+
 4549+!!end
 4550+
 4551+
 4552+!! test
45344553 HTML bullet list, closed tags (bug 5497)
45354554 !! input
45364555 <ul>
Index: trunk/phase3/includes/Parser.php
@@ -318,6 +318,7 @@
319319 '/(.) (?=\\?|:|;|!|%|\\302\\273)/' => '\\1&nbsp;\\2',
320320 # french spaces, Guillemet-right
321321 '/(\\302\\253) /' => '\\1&nbsp;',
 322+ '/&nbsp;(!important)/' => ' \\1', #Beware of CSS magic word !important, bug #11874.
322323 );
323324 $text = preg_replace( array_keys($fixtags), array_values($fixtags), $text );
324325
Index: trunk/phase3/RELEASE-NOTES
@@ -125,6 +125,7 @@
126126 * (bug 6892, 7147) Trackback error handling, optional fields more robust
127127 * (bug 6813) Don't break HTML validator when using trackbacks
128128 * Fix for size checks on SVG images with global 'stroke-width' attribute
 129+* (bug 11874) Inline CSS with !important no longer borken
129130
130131
131132 === API changes in 1.13 ===

Follow-up revisions

RevisionCommit summaryAuthorDate
r32377Update to r32375 / bug 11874 -- !important may have whitespace between ! and ...brion18:45, 24 March 2008

Status & tagging log