From 10eea3768de4390c5d2087bc4bcd0fb0f11d2f14 Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Tue, 9 May 2006 18:01:15 +0000 Subject: [PATCH] Fix #5586: treats text as links --- RELEASE-NOTES | 1 + includes/Parser.php | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index c7ec009239..c5a22abecf 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -230,6 +230,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * Added grammar function to Belarusian (be) * (bug 5819) Add 'PersonalUrls' hook * (bug 5862) Update of Belarusian language (be) +* (bug 5586) treated text as links == Compatibility == diff --git a/includes/Parser.php b/includes/Parser.php index 958c1bfea8..8976971ae9 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -3937,7 +3937,11 @@ class Parser $html = $pout->getText(); $ig->add( new Image( $nt ), $html ); - $this->mOutput->addImage( $nt->getDBkey() ); + + # Only add real images (bug #5586) + if ( $nt->getNamespace() == NS_IMAGE ) { + $this->mOutput->addImage( $nt->getDBkey() ); + } } return $ig->toHTML(); } -- 2.20.1