Manual:Hooks/InternalParseBeforeSanitize

From mediawiki.org
InternalParseBeforeSanitize
Available from version 1.20.0
Removed in version 1.40.0 (Gerrit change 860937)
This hook is called during Parser's internalParse method just before the parser removes unwanted/dangerous HTML tags and after nowiki/noinclude/includeonly/onlyinclude and other processings.
Define function:
public static function onInternalParseBeforeSanitize( Parser &$parser, &$text, StripState &$stripState ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"InternalParseBeforeSanitize": "MediaWiki\\Extension\\MyExtension\\Hooks::onInternalParseBeforeSanitize"
	}
}
Called from: File(s): parser/Parser.php
Interface: InternalParseBeforeSanitizeHook.php

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


This hook wass ideal for syntax-extensions after template/parser function execution which respect nowiki and HTML-comments.