Index: trunk/phase3/includes/Parser.php |
— | — | @@ -782,7 +782,7 @@ |
783 | 783 | |
784 | 784 | # replaceInternalLinks may sometimes leave behind |
785 | 785 | # absolute URLs, which have to be masked to hide them from replaceExternalLinks |
786 | | - $text = str_replace("http-noparse://","http://",$text); |
| 786 | + $text = str_replace(UNIQ_PREFIX."NOPARSE", "", $text); |
787 | 787 | |
788 | 788 | $text = $this->doMagicLinks( $text ); |
789 | 789 | $text = $this->doTableStuff( $text ); |
— | — | @@ -1397,7 +1397,7 @@ |
1398 | 1398 | $text = $this->replaceInternalLinks($text); |
1399 | 1399 | |
1400 | 1400 | # cloak any absolute URLs inside the image markup, so replaceExternalLinks() won't touch them |
1401 | | - $s .= $prefix . str_replace('http://', 'http-noparse://', $this->makeImage( $nt, $text ) ) . $trail; |
| 1401 | + $s .= $prefix . preg_replace("/\b($wgUrlProtocols)/", UNIQ_PREFIX."NOPARSE$1", $this->makeImage( $nt, $text) ) . $trail; |
1402 | 1402 | $wgLinkCache->addImageLinkObj( $nt ); |
1403 | 1403 | |
1404 | 1404 | wfProfileOut( "$fname-image" ); |