I am wondering if there is a contrib module which does the reverse of the core "Limit allowed HTML tags" (poorly named oxymoron, this should just be "Allow HTML tags") by allowing me to simply list the tags which I do not want allowed?

Basically I am trying to only block H1s (obviously editors should never be adding H1s to Body fields) and also EM tags. At the moment I need to enable the "limit allow" filter and add a full list of tags except the 2 I want to block. And every couple weeks the editors come up with another tag or attr which needs to be allowed. This would be much simpler to just have a "Block HTML tags" filter. Ideally this would just be a change to the core filter to have a block/allow option with this filter.

I suspect writing this isn't too difficult (just copy the core "allow" one and modify) but thought I would check if anyone knows of an existing contrib module which already exists.

  • If the two tags are not listed in limit allowed tags, how are they still rendering?
    – Kevin
    Jun 15 at 19:48
  • (poorly named oxymoron, this should just be "Allow HTML tags") <- Honestly, no. The former is grammatically correct, the latter is not. Maybe "Allowed HTML tags". But that's neither here nor there
    – Jaypan
    Jun 16 at 2:11
  • Sure, "Allowed", my point was "limit" makes no sense there.
    – liquidcms
    Jun 16 at 2:16

1 Answer 1


I don't know of a general purpose "block HTML tags" module, but the Markdown module has a Disallowed Raw HTML setting for escaping certain tags. However, this uses the League\Commonmark library and so is limited to Commonmark Markdown.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.