Topic: Restricting elements, attributes, and attribute values / 5 questions
I want to allow the posting of certain html tags only. I would use for the config:
'elements' => 'p, br, span, b, i, em, strong, sub, sup, strike, table, caption, tbody, tr, td',
Would that be correct?
Question n°2: How can I remove all style="..." attributes but allowed ones?
I could not find out how to use htmLawed to clean CSS styles. I want to allow only these style attributes: "color", "font-weight", "text-decoration", "background-color"
Question n°3: Are empty style-elements removed automatically?
After removing style attributes, is the style element removed. E.g. what becomes: <span style="">test</span>
Question n°4: How can class="" and id="" attributes be removed completely?
What settings do we need or is the hook_tag function required?
Question n°5: How can we remove empty tags, such as <b></b> or <p></p> -> only from the end of the content?
Thanks for your time and answers!
PS: Thanks for the great tool!