1

I really dislike the non-semantic usage of <big> on our wiki, and would like to prevent it. Flat-out commands didn't work so far, so I'm switching to doing it by code...

AFAIK, there's no configuration switch to control the blacklist/whitelist of HTML tags. Looking at the source code, it seems like the data is coming from Sanitizer::getRecognizedTagData(), while the work itself is done in Sanitizer::removeHTMLtags(). However, I do not see a way to add to the list myself, except using one of the hooks before or after (InternalParseBeforeSanitize, InternalParseBeforeLinks) and either:

  1. Call Sanitizer::removeHTMLtags() again myself, with the additional tag to blacklist as a parameter
  2. Do a search myself on the text to remove all the <big> tags.

The first one is a duplication of work, the second one is a duplication of code. Is there a better way? What would you recommend?

1 Answer 1

3

No coding is needed: just install AbuseFilter and create a rule that warns or disallows on save of pages containing these tags.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.