This commit is contained in:
2020-04-16 15:50:27 +00:00
parent 4107060c51
commit 079453e0d8
3 changed files with 12 additions and 7 deletions

View File

@@ -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>