This commit is contained in:
@@ -3,17 +3,13 @@
|
||||
<span class="v-label v-label--active theme--light">
|
||||
{{ $ay.t("WikiPage") }}
|
||||
</span>
|
||||
<v-sheet
|
||||
elevation="1"
|
||||
color="grey lighten-5"
|
||||
v-html="compiledOutput()"
|
||||
class="pa-2 pa-sm-6"
|
||||
>
|
||||
<v-sheet elevation="2" v-html="compiledOutput()" class="pa-2 pa-sm-6">
|
||||
</v-sheet>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import marked from "marked";
|
||||
import DOMPurify from "dompurify";
|
||||
export default {
|
||||
data: () => ({}),
|
||||
props: {
|
||||
@@ -22,7 +18,7 @@ export default {
|
||||
methods: {
|
||||
compiledOutput() {
|
||||
//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
|
||||
eyeball icon like password reveal
|
||||
|
||||
baseurl setting for local images:
|
||||
https://marked.js.org/#/USING_ADVANCED.md#options
|
||||
|
||||
*/
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user