$params = array( );
}
+ // Hack to support short XML style tags
+ $text = preg_replace( "/<$tag(\\s+[^>]*|\\s*)\\/>/i", "<$tag\\1></$tag>", $text );
+
if( $tag == STRIP_COMMENTS ) {
$start = '/<!--()/';
$end = '/-->/';
*/
function renderImageGallery( $text ) {
# Setup the parser
- global $wgUser, $wgParser, $wgTitle;
+ global $wgUser, $wgTitle;
$parserOptions = ParserOptions::newFromUser( $wgUser );
-
+ $localParser = new Parser();
+
global $wgLinkCache;
$ig = new ImageGallery();
$ig->setShowBytes( false );
$label = '';
}
- $html = $wgParser->parse( $label , $wgTitle, $parserOptions );
+ $html = $localParser->parse( $label , $wgTitle, $parserOptions );
$html = $html->mText;
$ig->add( new Image( $nt ), $html );