X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fparser%2FParserOutput.php;h=7de3b304f1d420d6ef8d1ff950f4731eab92e803;hb=17e7bc02357e42a78cf5fdcbf9e550dda4631ac6;hp=7bf848fb90929254258ad9b7c2e0cb7bdd78cda3;hpb=a04561095048bc2803b9821165c614df96eaf14a;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/parser/ParserOutput.php b/includes/parser/ParserOutput.php index 7bf848fb90..7de3b304f1 100644 --- a/includes/parser/ParserOutput.php +++ b/includes/parser/ParserOutput.php @@ -535,6 +535,10 @@ class ParserOutput extends CacheTime { # We don't register links pointing to our own server, unless... :-) global $wgServer, $wgRegisterInternalExternals; + # Replace unnecessary URL escape codes with the referenced character + # This prevents spammers from hiding links from the filters + $url = parser::normalizeLinkUrl( $url ); + $registerExternalLink = true; if ( !$wgRegisterInternalExternals ) { $registerExternalLink = !self::isLinkInternal( $wgServer, $url ); @@ -696,6 +700,8 @@ class ParserOutput extends CacheTime { * to SpecialTrackingCategories::$coreTrackingCategories, and extensions * should add to "TrackingCategories" in their extension.json. * + * @todo Migrate some code to TrackingCategories + * * @param string $msg Message key * @param Title $title title of the page which is being tracked * @return bool Whether the addition was successful @@ -707,7 +713,7 @@ class ParserOutput extends CacheTime { return false; } - // Important to parse with correct title (bug 31469) + // Important to parse with correct title (T33469) $cat = wfMessage( $msg ) ->title( $title ) ->inContentLanguage()