Details
-
Improvement
-
Status: Closed
-
High
-
Resolution: Fixed
-
None
-
None
Description
The refactoring and solution of CMS7-1610 for the ChildFacetUuidsModel introduced a second HtmlCleaner instance and processing of html fields besides the (optional) processing by the HtmlCleanerPlugin.
This is not a desirable situation as CMS7-8616 already showed:
- html parsing and rewriting is now done twice
- the ChildFacetUuidsModel uses a none configurable (hard-coded) HtmlCleaner, which may not by aligned with the HtmlCleanerPlugin
After thorough discussion the following solution has been decided to resolve this:
- use a single HtmlCleaner instance, as configured through the HtmlCleanerPlugin repository configuration
- this requires that the HtmlCleanerPlugin service always is used: if for a field the htmlcleaner.id is configured empty (null), then use and fallback to the 'default' org.hippoecm.frontend.plugins.richtext.IHtmlCleanerService
but (then) with whitelisting filtering disabled - the HtmlCleanerService will also get a new optional configuration property to enable/disable whitelisting explicitely (default true) which is useful and needed to support two or more HtmlCleanerService instances
- the RichTextModel will be refactored to get a ChildFacetUuidsModel optionally injected (instead of being wrapped by one)
- the RichTextModel will get an instantiated HtmlCleaner from the HtmlCleanerPlugin and create a TagNode from the html text with it
- this html TagNode then will first be passed into the ChildFacetUuidsModel (not used for the CKEditorPropertyPlugin) instead of the html text, which can modify it as needed
- thereafter the html TagNode will be passed into the HtmlCleanerPlugin to do (optional) whitelist filtering and the final serializing to a html string value
Attachments
Issue Links
- is a result of
-
CMS-1610 Wrong image shown in html editor when two images have the same name
- Closed
-
CMS-8616 Cannot type and save > any more in ckeditor because becomes >
- Closed
-
CMS-8713 Backport 8616 to 7.9: Cannot type and save > any more in ckeditor because becomes >
- Closed
- relates to
-
CMS-8718 Space before super- and subscripts.
- Closed