Merge "Replace deprecated Title::escapeCanonicalURL call"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Sat, 28 Jun 2014 07:45:04 +0000 (07:45 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Sat, 28 Jun 2014 07:45:04 +0000 (07:45 +0000)
includes/parser/CoreParserFunctions.php

index 3425b6b..cde7a2d 100644 (file)
@@ -242,7 +242,12 @@ class CoreParserFunctions {
        }
 
        static function canonicalurle( $parser, $s = '', $arg = null ) {
-               return self::urlFunction( 'escapeCanonicalURL', $s, $arg );
+               $temp = self::urlFunction( 'getCanonicalURL', $s, $arg );
+               if ( !is_string( $temp ) ) {
+                       return $temp;
+               } else {
+                       return htmlspecialchars( $temp );
+               }
        }
 
        static function urlFunction( $func, $s = '', $arg = null ) {