Last modified: 2012-07-05 14:36:19 UTC
Created attachment 10085 [details] adds a new hook 'InternalParseBeforeSanitize' to the parser I am in need for a new hook, making it possible to change parser output before it goes to the sanitizer. This is the second extension I am working on which would profit from this. The first time I was able to build around this by using 'InternalParseBeforeLinks' hook, calling Sanitizer::removeHTMLtags() manually on the newly inserted stuff. Now I had to run the whole sanitizer on the whole text for a second time. I guess calling the sanitizer just once would be faster and the new hook would be more suitable for extension development. One suitable name could be 'InternalParseBeforeSanitize'. See my patch for details.
You should also add this hook to doc/hooks.txt
Created attachment 10095 [details] equal to previous patch but with hooks documentation updated Thanks Reedy, I wasn't aware of that list. I will also create the hooks documentation on mediawiki.org as soon as it's implemented.
Daniel, would it be reasonable for you to submit this into Gerrit?
Sure Sumana, almost forgot about this since I am not working on these extensions currently but I'll submit it soon.
Submitted for review in If32053f9304088d7943aa0c9e78716a644c34fe1
Merged