Details
-
Improvement
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
None
-
None
Description
To reproduce:
- configure HtmlCleaner, and explicitlely forget to configure <div> element
- paste an HTML containing a <div> in a Richtext input
Expexcted: HtmlRepairer will break on line 518:
String[] allowedAttributes = template.getDescriptors().get(startElement.localName).getAttributeNames();
Fix: I think this behavior is confusing for the end user, you would rather expect that the cleaner removes every tags he is configured for, and leaves the remaining HTML tags alone.
Additionally, it could log an INFO, telling that some encountered tags are not configured.