FIX: Also support just open

This commit is contained in:
Robin Ward
2016-07-20 13:30:36 -04:00
parent e341596536
commit 16383a1749
3 changed files with 10 additions and 2 deletions

View File

@@ -3,7 +3,11 @@ import xss from 'pretty-text/xss';
const _validIframes = [];
function attr(name, value) {
return `${name}="${xss.escapeAttrValue(value)}"`;
if (value) {
return `${name}="${xss.escapeAttrValue(value)}"`;
}
return name;
}
const ESCAPE_REPLACEMENTS = {