Index: trunk/extensions/ImageMap/ImageMap_body.php |
— | — | @@ -70,32 +70,8 @@ |
71 | 71 | if ( wfIsBadImage( $imageTitle->getDBkey() , $parser->mTitle ) ) { |
72 | 72 | return self::error( 'imagemap_bad_image' ); |
73 | 73 | } |
74 | | - // Parse the options so we can use links and the like in the caption, code adapted from Cite extension |
75 | | - if ( method_exists( $parser, 'recursiveTagParse' ) ) { |
76 | | - // New fast method |
77 | | - $parsedoptions = $parser->recursiveTagParse( Sanitizer::escapeHtmlAllowEntities($options) ); |
78 | | - } else { |
79 | | - // Old method |
80 | | - $ret = $parser->parse( |
81 | | - Sanitizer::escapeHtmlAllowEntities($options), |
82 | | - $parser->mTitle, |
83 | | - $parser->mOptions, |
84 | | - // Avoid whitespace buildup |
85 | | - false, |
86 | | - false |
87 | | - ); |
88 | | - $text = $ret->getText(); |
89 | | - global $wgUseTidy; |
90 | | - if ( ! $wgUseTidy ) |
91 | | - $parsedoptions = $text; |
92 | | - else { |
93 | | - $text = preg_replace( '~^<p>\s*~', '', $text ); |
94 | | - $text = preg_replace( '~\s*</p>\s*~', '', $text ); |
95 | | - $text = preg_replace( '~\n$~', '', $text ); |
96 | | - |
97 | | - $parsedoptions = $text; |
98 | | - } |
99 | | - } |
| 74 | + // Parse the options so we can use links and the like in the caption |
| 75 | + $parsedoptions = $parser->recursiveTagParse( Sanitizer::escapeHtmlAllowEntities($options) ); |
100 | 76 | $imageHTML = $parser->makeImage( $imageTitle, $parsedoptions ); |
101 | 77 | $parser->mOutput->addImage( $imageTitle->getDBkey() ); |
102 | 78 | |