Details
-
New Feature
-
Resolution: Done
-
Neutral
-
6.2.20
-
None
-
-
Empty show more show less
-
Yes
-
Nucleus 13, Nucleus 14
-
5
Description
Due to the introduction of SafeHtmlValidator in Magnolia 6.2.20, there are validation errors for some tags that are not included in the validator but are needed by the users.
Reproduce
- Create a new page in demo author (basic template)
- Add a text and image component
- Add a link in the rich text field and go to the advanced tab to select left to right orientation (LTR) so the non-included tag is added
- Save the form
Expected
The dialog is saved
Actual
The dialog is not saved due to validation error: Malicious HTML code found
Notes
The value of allowed tags is hardcoded in SafeHtmlValidatorFactory, it would be good if those were configurable somewhere else so, if needed, users could add new allowed tags. If not possible to be configurable, more tags should be added to the list of allowed attributes (at least those that can be used in default CKEditor configuration)
Workaround
Override the SafeHtmlValidatorFactory on a custom Java module and set the tags you want to use in there as valid HTML tags.
OR
Disable the validator on the richtext-field until the release of 6.2.21
validators:
allowAny:
$type: null
Fix
Fixed in Magnolia 6.2.21. See the section on Global Validators.
Checklists
Attachments
Issue Links
- is cloned by
-
MGNLUI-7337 Magnolia 6.3 - Port SafeHtmlValidator from M6.2
-
- Closed
-
1.
|
Provide PR with global validators config |
|
Completed | Roman Kovařík | ||||||||
2.
|
Code rw (global config) |
|
Completed | Adam Siska | ||||||||
3.
|
Preint QA (global config) |
|
Completed | Adam Siska | ||||||||
4.
|
Provide docu PR (global config) |
|
Completed | Roman Kovařík | ||||||||
5.
|
QA |
|
Completed | Quach Hao Thien | ||||||||
6.
|
Code rw (safe-html validator config) |
|
Completed | Roman Kovařík | ||||||||
7.
|
Provide PR for safe-html validator config |
|
Completed | Sang Ngo Huu |
|
|||||||
8.
|
Preint QA (safe-html validator config) |
|
Completed | Roman Kovařík | ||||||||
9.
|
File ticket for 6.3 port |
|
Completed | Sang Ngo Huu |
|
|||||||
10.
|
Docu (safe-html validator config) |
|
Completed | Sang Ngo Huu |
|
|||||||
11.
|
Docu rw |
|
Completed | Alex Mansell |