r32377 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r32376‎ | r32377 | r32378 >
Date:18:45, 24 March 2008
Author:brion
Status:old
Tags:
Comment:
Update to r32375 / bug 11874 -- !important may have whitespace between ! and important
Modified paths:
  • /trunk/phase3/includes/Parser.php (modified) (history)
  • /trunk/phase3/maintenance/parserTests.txt (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/parserTests.txt
@@ -4547,7 +4547,16 @@
45484548
45494549 !!end
45504550
 4551+!! test
 4552+Punctuation: CSS ! important (bug 11874; with space after)
 4553+!! input
 4554+<div style="width:50% ! important">important</div>
 4555+!! result
 4556+<div style="width:50% ! important">important</div>
45514557
 4558+!!end
 4559+
 4560+
45524561 !! test
45534562 HTML bullet list, closed tags (bug 5497)
45544563 !! input
Index: trunk/phase3/includes/Parser.php
@@ -318,7 +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.
 322+ '/&nbsp;(!\s*important)/' => ' \\1', #Beware of CSS magic word !important, bug #11874.
323323 );
324324 $text = preg_replace( array_keys($fixtags), array_values($fixtags), $text );
325325

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r32375* (bug 11874) Inline CSS with !important no longer borken...brion18:32, 24 March 2008

Status & tagging log