From ea9b9f176d664520cff52a6d6545a16980e57052 Mon Sep 17 00:00:00 2001 From: Jens Frank Date: Sat, 22 Jan 2005 23:11:17 +0000 Subject: [PATCH] BUG#1217 Image within an image caption broke rendering --- includes/Parser.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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" ); -- 2.20.1