From: Jens Frank Date: Sat, 22 Jan 2005 23:11:17 +0000 (+0000) Subject: BUG#1217 Image within an image caption broke rendering X-Git-Tag: 1.5.0alpha1~861 X-Git-Url: http://git.cyclocoop.org/ecrire?a=commitdiff_plain;h=ea9b9f176d664520cff52a6d6545a16980e57052;p=lhc%2Fweb%2Fwiklou.git BUG#1217 Image within an image caption broke rendering --- diff --git a/includes/Parser.php b/includes/Parser.php index e5ed2f3b99..1f1701e197 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -1306,8 +1306,8 @@ class Parser $text = $this->replaceExternalLinks($text); $text = $this->replaceInternalLinks($text); - # replace the image with a link-holder so that replaceExternalLinks() can't mess with it - $s .= $prefix . $this->insertStripItem( $sk->makeImageLinkObj( $nt, $text ), $this->mStripState ) . $trail; + # cloak any absolute URLs inside the image markup, so replaceExternalLinks() won't touch them + $s .= $prefix . str_replace('http://', 'http-noparse://', $sk->makeImageLinkObj( $nt, $text ) ) . $trail; $wgLinkCache->addImageLinkObj( $nt ); wfProfileOut( "$fname-image" );