< Manual:Hooks
![]() | This deprecated feature should no longer be used, but is still available for reasons of backwards compatibility. This feature was deprecated in version 1.35.0. Use an alternative hook which doesn't expose internal half-parsed state, like ParserBeforeInternalParse | or ParserAfterTidy
InternalParseBeforeSanitize | |
---|---|
Available from version 1.20.0 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": "MyExtensionHooks::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 is ideal for syntax-extensions after template/parser function execution which respect nowiki and HTML-comments.
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.