Skip to content

Commit 0b50890

Browse files
committed
handle custom elements
1 parent 82245cf commit 0b50890

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

resources/js/show/components/fields/text/TextRenderer.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,3 @@
4444
<template>
4545
<TemplateRenderer :template="formattedContent" :components="components" />
4646
</template>
47-

resources/js/utils/sanitize.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ export function sanitize(html: string | null) {
66
ADD_TAGS: ['iframe'],
77
CUSTOM_ELEMENT_HANDLING: {
88
tagNameCheck: () => true,
9-
attributeNameCheck: () => true,
9+
attributeNameCheck: (name) => {
10+
return !name.match(/^(v-)|:|@|#/); // remove vue related attributes
11+
},
1012
},
1113
})
1214
: html;

0 commit comments

Comments
 (0)