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:
Tim Starling 2008-09-16 02:17:55 +00:00
parent 0ad5f18f00
commit fd5ed58955

View file

@ -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();