mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: fix comment action
This commit is contained in:
1 parent
25f1a4ce81
commit
5e4cdd3164
5 files changed
+15
-15
No files matched your search
@@ -24,13 +24,13 @@ const xss = new Xss.FilterXSS({
|
||||
dd: [],
|
||||
del: ['datetime'],
|
||||
details: ['open'],
|
||||
div: ['id','class'],
|
||||
div: ['id', 'class'],
|
||||
dl: [],
|
||||
dt: [],
|
||||
em: [],
|
||||
font: ['color', 'size', 'face'],
|
||||
h1: ['id'],
|
||||
h2: ['id','class'],
|
||||
h2: ['id', 'class'],
|
||||
h3: ['id'],
|
||||
h4: ['id'],
|
||||
h5: ['id'],
|
||||
@@ -66,8 +66,11 @@ const xss = new Xss.FilterXSS({
|
||||
var: [],
|
||||
video: ['autoplay', 'controls', 'loop', 'preload', 'src', 'height', 'width'],
|
||||
},
|
||||
allowCommentTag: false,
|
||||
stripIgnoreTagBody: ['script'],
|
||||
safeAttrValue(tag, name, value) {
|
||||
if (name === 'id') return `xss-id-${value}`;
|
||||
if (name === 'class') return value.replace(/badge/g, 'xss-badge');
|
||||
return value;
|
||||
},
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user