Jump to navigation Jump to search
Available from version 1.20.0
during Parser's internalParse method just before the parser removes unwanted/dangerous HTML tags and after nowiki/noinclude/includeonly/ onlyinclude and other processings. Ideal for syntax-extensions after template/parser function execution which respect nowiki and HTML-comments.
Define function:
public static function onInternalParseBeforeSanitize( Parser &$parser, &$text, StripState &$stripState ) { ... }
Attach hook:

In extension.json:

	"Hooks": {
		"InternalParseBeforeSanitize": "MyExtensionHooks::onInternalParseBeforeSanitize"

For MediaWiki ≤1.25:

$wgHooks['InternalParseBeforeSanitize'][] = 'MyExtensionHooks::onInternalParseBeforeSanitize';
Called from:File(s): parser/Parser.php

For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:InternalParseBeforeSanitize extensions.