# 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 );
* @since 1.25
*/
public function addTrackingCategory( $msg, $title ) {
- if ( $title->getNamespace() === NS_SPECIAL ) {
+ if ( $title->isSpecialPage() ) {
wfDebug( __METHOD__ . ": Not adding tracking category $msg to special page!\n" );
return false;
}
- // Important to parse with correct title (bug 31469)
+ // Important to parse with correct title (T33469)
$cat = wfMessage( $msg )
->title( $title )
->inContentLanguage()