From 2900ef2f23b153754ccae8b0503d5bc5af5b4625 Mon Sep 17 00:00:00 2001 From: Jakob Date: Wed, 29 May 2024 20:31:13 -0400 Subject: [PATCH] Add align to img, p, and div --- lib/helpers/parse.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/helpers/parse.js b/lib/helpers/parse.js index 6bf9fe0b6..37628c3d0 100644 --- a/lib/helpers/parse.js +++ b/lib/helpers/parse.js @@ -14,7 +14,7 @@ export const configuredXss = new xss.FilterXSS({ kbd: ['id'], input: ['checked', 'disabled', 'type'], iframe: ['width', 'height', 'allowfullscreen', 'frameborder', 'start', 'end'], - img: [...xss.whiteList.img, 'usemap', 'style'], + img: [...xss.whiteList.img, 'usemap', 'style', 'align'], map: ['name'], area: [...xss.whiteList.a, 'coords'], a: [...xss.whiteList.a, 'rel'], @@ -22,6 +22,8 @@ export const configuredXss = new xss.FilterXSS({ th: [...xss.whiteList.th, 'style'], picture: [], source: ['media', 'sizes', 'src', 'srcset', 'type'], + p: [...xss.whiteList.p, 'align'], + div: [...xss.whiteList.p, 'align'], }, css: { whiteList: {