From 6121a42883b629dfbe4a874e99587b2f4febc3e6 Mon Sep 17 00:00:00 2001 From: Bryan Tong Minh Date: Sun, 1 Jun 2008 18:31:40 +0000 Subject: [PATCH] (bug 11659) Urldecode image names in galleries (fixed in a similar way as done for regular links) --- RELEASE-NOTES | 1 + includes/Parser.php | 3 +++ 2 files changed, 4 insertions(+) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 211b78b75f..67e3b2b9e9 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -318,6 +318,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 14370) When a grouppage-x message does not exist the entry on the ListGroupRights special page links to the main namespace page not the project namespace page. +* (bug 11659) Urldecode image names in galleries === API changes in 1.13 === diff --git a/includes/Parser.php b/includes/Parser.php index 0b8497f4fb..a763ab1ae4 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -4366,6 +4366,9 @@ class Parser if ( count( $matches ) == 0 ) { continue; } + + if ( strpos( $matches[0], '%' ) !== false ) + $matches[1] = urldecode( $matches[1] ); $tp = Title::newFromText( $matches[1] ); $nt =& $tp; if( is_null( $nt ) ) { -- 2.20.1