Sometimes there is a need to customize the white list. Our specific use is that we are using the comments feature of (some recent version of) CKEditor. It inserts comments into the HTML using a non-standard HTML tag, so these are getting sanitized out.
This PR adds a new version of the safeTags filter, called mySafeTags, that allows you to supply custom versions of safeTagName and sanitizeAttribute. You can easily build your own version of these functions on top of the originals with small changes in behavior, such as adding or removing one or more specific items from the white list. Or you can build your own from scratch.
Sometimes there is a need to customize the white list. Our specific use is that we are using the comments feature of (some recent version of) CKEditor. It inserts comments into the HTML using a non-standard HTML tag, so these are getting sanitized out.
This PR adds a new version of the
safeTags
filter, calledmySafeTags
, that allows you to supply custom versions ofsafeTagName
andsanitizeAttribute
. You can easily build your own version of these functions on top of the originals with small changes in behavior, such as adding or removing one or more specific items from the white list. Or you can build your own from scratch.