From 1dfdfe3932f17d7d4dce7ea0ea9ee7308b61e7fb Mon Sep 17 00:00:00 2001 From: wangruidong <940853815@qq.com> Date: Thu, 11 Apr 2024 15:47:26 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20xss=E5=A4=84=E7=90=86=E5=90=8E=E6=97=A0c?= =?UTF-8?q?lass=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/xss.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/utils/xss.js b/src/utils/xss.js index d7a07dd36..28e2c1ea7 100644 --- a/src/utils/xss.js +++ b/src/utils/xss.js @@ -18,6 +18,7 @@ const options = { if (['src', 'href'].indexOf(name) !== -1) { return name + '=' + value.replace('javascript:', 'java:').replace('data:', 'dt:') } + return name + '="' + xss.escapeAttrValue(value) + '"' } } const filter = new xss.FilterXSS(options)