Hi,

Certain tags have some important visual implications, such as <p>, <div> and <br>. However, users/editors might apply classes against these tags, e.g. <p class="superlarge"> which could alter the appearance drastically and interfere with a listing created by views. It could be argued that this may be a flaw in the way the CSS has been created, but the administrator might not always have a say/choice in this setup.

The problem is that the all or nothing approach of "Strip HTML tags" removes not only the undesired classes on certain tags, but the entire tag which often mashes up the entire tag without line breaks or similar.

I think it would be great to be able to use similar selectors as available in CSS which would allow to keep a p tag without classes or specific classes or remove all p tags.

If that is not easy to implement, e.g. through regular expressions, or not performing fast enough, maybe a second option as add on to strip HTML tags could be possible, e.g. "Remove all classes and styles" which would retain the tag, but strip everything else.

Cheers, J.

Comments

jelo created an issue.