@optimiser/common 1.0.385 → 1.0.387
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.
- package/dist/lib/utility.js +2 -11
- package/package.json +1 -1
package/dist/lib/utility.js
CHANGED
|
@@ -4736,17 +4736,8 @@ function IsAnotherObjectField(pageData, fieldName) {
|
|
|
4736
4736
|
return false;
|
|
4737
4737
|
}
|
|
4738
4738
|
var CustomSanitizeHtml = function (dirtyHtml) {
|
|
4739
|
-
|
|
4740
|
-
|
|
4741
|
-
allowedAttributes: {
|
|
4742
|
-
'*': ['href', 'align', 'alt', 'center', 'bgcolor', 'src', 'title', 'width'],
|
|
4743
|
-
},
|
|
4744
|
-
allowedSchemes: ['http', 'https', 'mailto'], // Allow URLs with these schemes
|
|
4745
|
-
textFilter: function (text) { return text; }, // Keep special characters like & intact
|
|
4746
|
-
parser: {
|
|
4747
|
-
decodeEntities: false, // Prevent converting & to &
|
|
4748
|
-
},
|
|
4749
|
-
});
|
|
4739
|
+
var sanitizeHtmlContent = (0, sanitize_html_1.default)(dirtyHtml);
|
|
4740
|
+
return sanitizeHtmlContent.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
|
|
4750
4741
|
};
|
|
4751
4742
|
/*
|
|
4752
4743
|
* Created by: Nirbhay as on 01-09-22
|