Jump to content
MediaWiki

Manual:Hooks/InternalParseBeforeSanitize

From mediawiki.org
This feature was removed completely in version 1.40.0 (after being deprecated in 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
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.

AltStyle によって変換されたページ (->オリジナル) /