We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b823ed1 commit f6a9951Copy full SHA for f6a9951
public/js/render.js
@@ -14,6 +14,12 @@ var filterXSSOptions = {
14
return html;
15
}
16
},
17
+ onTagAttr: function (tag, name, value, isWhiteAttr) {
18
+ // allow href starts with '.' or '/'
19
+ if (isWhiteAttr && name === 'href' && (value.indexOf('.') == 0 || value.indexOf('/') == 0)) {
20
+ return name + '="' + filterXSS.escapeAttrValue(value) + '"';
21
+ }
22
+ },
23
onIgnoreTagAttr: function (tag, name, value, isWhiteAttr) {
24
// allow attr start with 'data-' or in the whiteListAttr
25
if (name.substr(0, 5) === 'data-' || whiteListAttr.indexOf(name) !== -1) {
0 commit comments