Page MenuHomePhabricator

If an img tag is missing a closing slash then the parser hook isn't called
Open, Needs TriagePublic

Description

I'm upgrading my custom site from MediaWiki 1.25 to 1.33 and now in my custom skin if I call

$parser->setHook( 'img', 'MyClass::ImgRender' );

it still works for img tags that have a closing slash: <img src="...png"/>
But the hook is no longer called for <img src="...png"> without a closing slash.
In MediaWiki 1.25 it worked for both.

Event Timeline

Hi @Meisoda22, thanks for taking the time to report this and welcome to Wikimedia Phabricator!

Wondering if T48443 / T134423 (though that's about non-void tags only) are slightly related.

Hi @Aklapper . Thank you. I imagine that in practice they may be related within the code, since they both occur during parsing. But I think that at least in theory they're really two different things.