From: Aryeh Gregor Date: Sun, 6 Sep 2009 15:08:10 +0000 (+0000) Subject: Fix YET ANOTHER PHP WEAK TYPING BUG X-Git-Tag: 1.31.0-rc.0~39894 X-Git-Url: http://git.cyclocoop.org/ecrire?a=commitdiff_plain;h=1cdedb1d44c9075ce1e07ed79dbbed2cd4ee83d3;p=lhc%2Fweb%2Fwiklou.git Fix YET ANOTHER PHP WEAK TYPING BUG Literal "0" was getting quoted. Because, of course, 0 is equal to the empty string. --- diff --git a/includes/Html.php b/includes/Html.php index a58459d04a..8a518df685 100644 --- a/includes/Html.php +++ b/includes/Html.php @@ -237,7 +237,7 @@ class Html { # marks omitted, but not all. (Although a literal " is not # permitted, we don't check for that, since it will be escaped # anyway.) - if ( $wgWellFormedXml || $value == '' + if ( $wgWellFormedXml || $value === '' || preg_match( "/[ '=<>]/", $value ) ) { $quote = '"'; } else {