Index: trunk/phase3/includes/parser/Parser.php |
— | — | @@ -129,7 +129,7 @@ |
130 | 130 | $this->mFunctionHooks = array(); |
131 | 131 | $this->mFunctionTagHooks = array(); |
132 | 132 | $this->mFunctionSynonyms = array( 0 => array(), 1 => array() ); |
133 | | - $this->mDefaultStripList = $this->mStripList = array( 'nowiki', 'gallery', 'a' ); |
| 133 | + $this->mDefaultStripList = $this->mStripList = array( 'nowiki', 'gallery' ); |
134 | 134 | $this->mUrlProtocols = wfUrlProtocols(); |
135 | 135 | $this->mExtLinkBracketedRegex = '/\[(\b(' . wfUrlProtocols() . ')'. |
136 | 136 | '[^][<>"\\x00-\\x20\\x7F]+) *([^\]\\x0a\\x0d]*?)\]/S'; |
— | — | @@ -3308,9 +3308,6 @@ |
3309 | 3309 | case 'gallery': |
3310 | 3310 | $output = $this->renderImageGallery( $content, $attributes ); |
3311 | 3311 | break; |
3312 | | - case 'a': |
3313 | | - $output = $this->renderHyperlink( $content, $attributes, $frame ); |
3314 | | - break; |
3315 | 3312 | case 'math': |
3316 | 3313 | if ( $this->mOptions->getUseTeX() ) { |
3317 | 3314 | $output = $wgContLang->armourMath( |
— | — | @@ -4358,35 +4355,6 @@ |
4359 | 4356 | } |
4360 | 4357 | |
4361 | 4358 | /** |
4362 | | - * Tag hook handler for 'a'. Renders a HTML <a> tag, allowing most attributes, filtering href against |
4363 | | - * allowed protocols and spam blacklist. |
4364 | | - **/ |
4365 | | - function renderHyperlink( $text, $params, $frame = false ) { |
4366 | | - foreach ( $params as $name => $value ) { |
4367 | | - $params[ $name ] = $this->replaceVariables( $value, $frame ); |
4368 | | - } |
4369 | | - |
4370 | | - $whitelist = Sanitizer::attributeWhitelist( 'a' ); |
4371 | | - $params = Sanitizer::validateAttributes( $params, $whitelist ); |
4372 | | - |
4373 | | - $content = $this->recursiveTagParse( trim( $text ), $frame ); |
4374 | | - |
4375 | | - if ( isset( $params[ 'href' ] ) ) { |
4376 | | - $href = $params[ 'href' ]; |
4377 | | - $this->mOutput->addExternalLink( $href ); |
4378 | | - unset( $params[ 'href' ] ); |
4379 | | - } else { |
4380 | | - # Non-link <a> tag |
4381 | | - return Xml::openElement( 'a', $params ) . $content . Xml::closeElement( 'a' ); |
4382 | | - } |
4383 | | - |
4384 | | - $sk = $this->mOptions->getSkin(); |
4385 | | - $html = $sk->makeExternalLink( $href, $content, false, '', $params ); |
4386 | | - |
4387 | | - return $html; |
4388 | | - } |
4389 | | - |
4390 | | - /** |
4391 | 4359 | * Renders an image gallery from a text with one line per image. |
4392 | 4360 | * text labels may be given by using |-style alternative text. E.g. |
4393 | 4361 | * Image:one.jpg|The number "1" |