Index: branches/REL1_5/phase3/includes/Parser.php |
— | — | @@ -773,7 +773,7 @@ |
774 | 774 | |
775 | 775 | # replaceInternalLinks may sometimes leave behind |
776 | 776 | # absolute URLs, which have to be masked to hide them from replaceExternalLinks |
777 | | - $text = str_replace("http-noparse://","http://",$text); |
| 777 | + $text = str_replace(UNIQ_PREFIX."NOPARSE", "", $text); |
778 | 778 | |
779 | 779 | $text = $this->doMagicLinks( $text ); |
780 | 780 | $text = $this->doTableStuff( $text ); |
— | — | @@ -1388,7 +1388,7 @@ |
1389 | 1389 | $text = $this->replaceInternalLinks($text); |
1390 | 1390 | |
1391 | 1391 | # cloak any absolute URLs inside the image markup, so replaceExternalLinks() won't touch them |
1392 | | - $s .= $prefix . str_replace('http://', 'http-noparse://', $this->makeImage( $nt, $text ) ) . $trail; |
| 1392 | + $s .= $prefix . preg_replace("/\b($wgUrlProtocols)/", UNIQ_PREFIX."NOPARSE$1", $this->makeImage( $nt, $text) ) . $trail; |
1393 | 1393 | $wgLinkCache->addImageLinkObj( $nt ); |
1394 | 1394 | |
1395 | 1395 | wfProfileOut( "$fname-image" ); |