@festo-ui/angular 11.0.0-dev.937 → 11.0.0-dev.942
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -6817,7 +6817,17 @@ class FngTextEditorComponent extends FngValueAccessorBaseDirective {
|
|
|
6817
6817
|
value = sanitizeConfig.sanitizingFn(this.domSanitizer, value);
|
|
6818
6818
|
}
|
|
6819
6819
|
if (sanitizeConfig && !sanitizeConfig.skipDefaultSanitizing) {
|
|
6820
|
+
// Quill v2 uses data-list attributes to distinguish list types (bullet vs ordered),
|
|
6821
|
+
// but Angular's DomSanitizer strips all data-* attributes.
|
|
6822
|
+
// Encode data-list as a class before sanitizing and restore it afterwards,
|
|
6823
|
+
// so bullet lists are not incorrectly converted to ordered lists.
|
|
6824
|
+
value = value
|
|
6825
|
+
.replace(/ data-list="bullet"/g, ' class="fng-list-type-bullet"')
|
|
6826
|
+
.replace(/ data-list="ordered"/g, ' class="fng-list-type-ordered"');
|
|
6820
6827
|
value = this.domSanitizer.sanitize(SecurityContext.HTML, value) || '';
|
|
6828
|
+
value = value
|
|
6829
|
+
.replace(/ class="fng-list-type-bullet"/g, ' data-list="bullet"')
|
|
6830
|
+
.replace(/ class="fng-list-type-ordered"/g, ' data-list="ordered"');
|
|
6821
6831
|
}
|
|
6822
6832
|
if (sanitizeConfig && !sanitizeConfig.skipWhitespaceHandling) {
|
|
6823
6833
|
value = this.handleWhitespace(value);
|