* (bug 1636) Refs like ţ were misinterpreted as octal in some places
authorBrion Vibber <brion@users.mediawiki.org>
Thu, 21 Apr 2005 06:20:10 +0000 (06:20 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Thu, 21 Apr 2005 06:20:10 +0000 (06:20 +0000)
includes/GlobalFunctions.php

index 6535669..f50ce44 100644 (file)
@@ -213,7 +213,7 @@ function wfUtf8Sequence( $codepoint ) {
 function wfMungeToUtf8( $string ) {
        global $wgInputEncoding; # This is debatable
        #$string = iconv($wgInputEncoding, "UTF-8", $string);
-       $string = preg_replace ( '/&#([0-9]+);/e', 'wfUtf8Sequence($1)', $string );
+       $string = preg_replace ( '/&#0*([0-9]+);/e', 'wfUtf8Sequence($1)', $string );
        $string = preg_replace ( '/&#x([0-9a-f]+);/ie', 'wfUtf8Sequence(0x$1)', $string );
        # Should also do named entities here
        return $string;