From 1ca04031afd2e1969962c8ed35b29e92aef5cb93 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Mon, 24 Mar 2008 18:45:26 +0000 Subject: [PATCH] Update to r32375 / bug 11874 -- !important may have whitespace between ! and important --- includes/Parser.php | 2 +- maintenance/parserTests.txt | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/includes/Parser.php b/includes/Parser.php index 31d91462f4..86e90cee24 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -318,7 +318,7 @@ class Parser '/(.) (?=\\?|:|;|!|%|\\302\\273)/' => '\\1 \\2', # french spaces, Guillemet-right '/(\\302\\253) /' => '\\1 ', - '/ (!important)/' => ' \\1', #Beware of CSS magic word !important, bug #11874. + '/ (!\s*important)/' => ' \\1', #Beware of CSS magic word !important, bug #11874. ); $text = preg_replace( array_keys($fixtags), array_values($fixtags), $text ); diff --git a/maintenance/parserTests.txt b/maintenance/parserTests.txt index 366aed8997..a8ca7d913a 100644 --- a/maintenance/parserTests.txt +++ b/maintenance/parserTests.txt @@ -4547,6 +4547,15 @@ Punctuation: CSS !important (bug 11874) !!end +!! test +Punctuation: CSS ! important (bug 11874; with space after) +!! input +
important
+!! result +
important
+ +!!end + !! test HTML bullet list, closed tags (bug 5497) -- 2.20.1