feat: katex + admin SSL UI (wip) + dev warning

This commit is contained in:
NGPixel
2019-12-18 23:45:19 -05:00
parent d407312caa
commit aa5368b2a1
24 changed files with 1076 additions and 346 deletions

View File

@@ -6,31 +6,35 @@ module.exports = {
input = xss(input, {
whiteList: {
...xss.whiteList,
a: ['class', 'id', 'href', 'target', 'title'],
blockquote: ['class', 'id'],
code: ['class'],
div: ['class', 'id'],
em: ['class'],
h1: ['class', 'id'],
h2: ['class', 'id'],
h3: ['class', 'id'],
h4: ['class', 'id'],
h5: ['class', 'id'],
h6: ['class', 'id'],
img: ['alt', 'class', 'draggable', 'height', 'src', 'width'],
li: ['class'],
ol: ['class'],
p: ['class'],
pre: ['class'],
strong: ['class'],
table: ['border', 'class', 'id', 'width'],
tbody: ['class'],
td: ['align', 'class', 'colspan', 'rowspan', 'valign'],
th: ['align', 'class', 'colspan', 'rowspan', 'valign'],
thead: ['class'],
tr: ['class', 'rowspan', 'align', 'valign'],
ul: ['class']
}
a: ['class', 'id', 'href', 'style', 'target', 'title'],
blockquote: ['class', 'id', 'style'],
code: ['class', 'style'],
div: ['class', 'id', 'style'],
em: ['class', 'style'],
h1: ['class', 'id', 'style'],
h2: ['class', 'id', 'style'],
h3: ['class', 'id', 'style'],
h4: ['class', 'id', 'style'],
h5: ['class', 'id', 'style'],
h6: ['class', 'id', 'style'],
img: ['alt', 'class', 'draggable', 'height', 'src', 'style', 'width'],
li: ['class', 'style'],
ol: ['class', 'style'],
p: ['class', 'style'],
path: ['d', 'style'],
pre: ['class', 'style'],
span: ['class', 'style'],
strong: ['class', 'style'],
svg: ['width', 'height', 'viewBox', 'preserveAspectRatio', 'style'],
table: ['border', 'class', 'id', 'style', 'width'],
tbody: ['class', 'style'],
td: ['align', 'class', 'colspan', 'rowspan', 'style', 'valign'],
th: ['align', 'class', 'colspan', 'rowspan', 'style', 'valign'],
thead: ['class', 'style'],
tr: ['class', 'rowspan', 'style', 'align', 'valign'],
ul: ['class', 'style']
},
css: false
})
}
return input