Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

a标签已经被加入到了白名a: ['class', 'href', 'target'],但是href里面放入自定义协议,比如baidu360://efwefwfwe给过滤了,怎么办 #281

Open
daweiyong opened this issue Jul 28, 2023 · 1 comment

Comments

@daweiyong
Copy link

name: 'innerHTML',
// xss白名单,可根据业务需求自己定制
value: xss(_s(${directiveMeta.value}), { whiteList: { img: ['class', 'src', 'style', 'fileurl'], br: [], i: [], a: ['class', 'href', 'target'], span: ['class', 'style'], p: ['class'], font: ['style'], b: ['class','style'], div: ['class','style'], u: ['class','style'], h1:['class','style'], h2:['class','style'], h3:['class','style'], h4:['class','style'], h5:['class','style'], h6:['class','style'], ul:['class','style'], li:['class','style'], ol:['class','style'], blockquote:['class','style'], em:['class','style'], strong:['class','style'], hr:['class','style'], code:['class','style'] } })

@Grewer
Copy link

Grewer commented Aug 22, 2024

onTagAttr 里匹配处理

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants