mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ImageMap
synced 2024-11-15 18:29:27 +00:00
Run the post-internalParse() parser stages on the output of makeImage() before attempting to parse it as XHTML, in particular: unstrip, RLH and normalizeCharReferences(). Fixes invalid character references as per complaint on wikitech-l.
This commit is contained in:
parent
0ad5f18f00
commit
fd5ed58955
|
@ -71,8 +71,11 @@ class ImageMap {
|
|||
return self::error( 'imagemap_bad_image' );
|
||||
}
|
||||
// Parse the options so we can use links and the like in the caption
|
||||
$parsedoptions = $parser->recursiveTagParse( $options );
|
||||
$imageHTML = $parser->makeImage( $imageTitle, $parsedoptions );
|
||||
$parsedOptions = $parser->recursiveTagParse( $options );
|
||||
$imageHTML = $parser->makeImage( $imageTitle, $parsedOptions );
|
||||
$parser->replaceLinkHolders( $imageHTML );
|
||||
$imageHTML = $parser->mStripState->unstripBoth( $imageHTML );
|
||||
$imageHTML = Sanitizer::normalizeCharReferences( $imageHTML );
|
||||
$parser->mOutput->addImage( $imageTitle->getDBkey() );
|
||||
|
||||
$domDoc = new DOMDocument();
|
||||
|
|
Loading…
Reference in a new issue