Update:Html sanitizer to allow br tag

This commit is contained in:
advplyr 2023-02-25 15:05:44 -06:00
parent 9c6b07df99
commit 0d50d730d9

View File

@ -1,10 +1,10 @@
const sanitizeHtml = require('../libs/sanitizeHtml')
const {entities} = require("./htmlEntities");
const { entities } = require("./htmlEntities");
function sanitize(html) {
const sanitizerOptions = {
allowedTags: [
'p', 'ol', 'ul', 'li', 'a', 'strong', 'em', 'del'
'p', 'ol', 'ul', 'li', 'a', 'strong', 'em', 'del', 'br'
],
disallowedTagsMode: 'discard',
allowedAttributes: {