Index: branches/REL1_4/phase3/maintenance/parserTests.txt |
— | — | @@ -991,6 +991,18 @@ |
992 | 992 | </p> |
993 | 993 | !! end |
994 | 994 | |
| 995 | +!! test |
| 996 | +Interwiki link encoding conversion (bug 1636) |
| 997 | +!! input |
| 998 | +*[[Wikipedia:ro:Olteniţa]] |
| 999 | +*[[Wikipedia:ro:Olteniţa]] |
| 1000 | +!! result |
| 1001 | +<ul><li><a href="http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a" class='extiw' title="Wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a> |
| 1002 | +</li><li><a href="http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a" class='extiw' title="Wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a> |
| 1003 | +</li></ul> |
| 1004 | + |
| 1005 | +!! end |
| 1006 | + |
995 | 1007 | ## |
996 | 1008 | ## XHTML tidiness |
997 | 1009 | ### |
Index: branches/REL1_4/phase3/includes/GlobalFunctions.php |
— | — | @@ -213,7 +213,7 @@ |
214 | 214 | function wfMungeToUtf8( $string ) { |
215 | 215 | global $wgInputEncoding; # This is debatable |
216 | 216 | #$string = iconv($wgInputEncoding, "UTF-8", $string); |
217 | | - $string = preg_replace ( '/&#([0-9]+);/e', 'wfUtf8Sequence($1)', $string ); |
| 217 | + $string = preg_replace ( '/�*([0-9]+);/e', 'wfUtf8Sequence($1)', $string ); |
218 | 218 | $string = preg_replace ( '/&#x([0-9a-f]+);/ie', 'wfUtf8Sequence(0x$1)', $string ); |
219 | 219 | # Should also do named entities here |
220 | 220 | return $string; |