You've already forked AstralRinth
forked from didirus/AstralRinth
Merge branch 'master' of https://github.com/modrinth/knossos
This commit is contained in:
@@ -2,8 +2,17 @@ import Vue from 'vue'
|
|||||||
import xss from 'xss'
|
import xss from 'xss'
|
||||||
import marked from 'marked'
|
import marked from 'marked'
|
||||||
|
|
||||||
|
const options = {
|
||||||
|
whiteList: {
|
||||||
|
...xss.whiteList,
|
||||||
|
summary: [],
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
const configuredXss = new xss.FilterXSS(options)
|
||||||
|
|
||||||
function compileMarkdown(target, markdown) {
|
function compileMarkdown(target, markdown) {
|
||||||
target.innerHTML = xss(marked(markdown))
|
target.innerHTML = configuredXss.process(marked(markdown))
|
||||||
}
|
}
|
||||||
|
|
||||||
Vue.directive('compiled-markdown', {
|
Vue.directive('compiled-markdown', {
|
||||||
|
|||||||
Reference in New Issue
Block a user