This commit is contained in:
5
ayanova/package-lock.json
generated
5
ayanova/package-lock.json
generated
@@ -9695,6 +9695,11 @@
|
|||||||
"domelementtype": "1"
|
"domelementtype": "1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"dompurify": {
|
||||||
|
"version": "2.0.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.0.8.tgz",
|
||||||
|
"integrity": "sha512-vIOSyOXkMx81ghEalh4MLBtDHMx1bhKlaqHDMqM2yeitJ996SLOk5mGdDpI9ifJAgokred8Rmu219fX4OltqXw=="
|
||||||
|
},
|
||||||
"domutils": {
|
"domutils": {
|
||||||
"version": "1.7.0",
|
"version": "1.7.0",
|
||||||
"resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz",
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"core-js": "^3.6.4",
|
"core-js": "^3.6.4",
|
||||||
|
"dompurify": "^2.0.8",
|
||||||
"jwt-decode": "^2.2.0",
|
"jwt-decode": "^2.2.0",
|
||||||
"luxon": "^1.22.2",
|
"luxon": "^1.22.2",
|
||||||
"marked": "^0.8.2",
|
"marked": "^0.8.2",
|
||||||
|
|||||||
@@ -3,17 +3,13 @@
|
|||||||
<span class="v-label v-label--active theme--light">
|
<span class="v-label v-label--active theme--light">
|
||||||
{{ $ay.t("WikiPage") }}
|
{{ $ay.t("WikiPage") }}
|
||||||
</span>
|
</span>
|
||||||
<v-sheet
|
<v-sheet elevation="2" v-html="compiledOutput()" class="pa-2 pa-sm-6">
|
||||||
elevation="1"
|
|
||||||
color="grey lighten-5"
|
|
||||||
v-html="compiledOutput()"
|
|
||||||
class="pa-2 pa-sm-6"
|
|
||||||
>
|
|
||||||
</v-sheet>
|
</v-sheet>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import marked from "marked";
|
import marked from "marked";
|
||||||
|
import DOMPurify from "dompurify";
|
||||||
export default {
|
export default {
|
||||||
data: () => ({}),
|
data: () => ({}),
|
||||||
props: {
|
props: {
|
||||||
@@ -22,7 +18,7 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
compiledOutput() {
|
compiledOutput() {
|
||||||
//return marked(this.content, { sanitize: true });
|
//return marked(this.content, { sanitize: true });
|
||||||
return marked(this.value);
|
return DOMPurify.sanitize(marked(this.value));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -35,5 +31,8 @@ remove extra spacing on sides in xs mode (gutters maybe on column or row?)
|
|||||||
Show/hide/edit control
|
Show/hide/edit control
|
||||||
eyeball icon like password reveal
|
eyeball icon like password reveal
|
||||||
|
|
||||||
|
baseurl setting for local images:
|
||||||
|
https://marked.js.org/#/USING_ADVANCED.md#options
|
||||||
|
|
||||||
*/
|
*/
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user