diff --git a/core/core-frontend/src/custom-component/scroll-text/Component.vue b/core/core-frontend/src/custom-component/scroll-text/Component.vue index 430e49c1a5..95c31e4eee 100644 --- a/core/core-frontend/src/custom-component/scroll-text/Component.vue +++ b/core/core-frontend/src/custom-component/scroll-text/Component.vue @@ -5,6 +5,7 @@ import { computed, nextTick, onBeforeUnmount, onMounted, ref } from 'vue' import { toRefs } from 'vue' import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain' import { storeToRefs } from 'pinia' +import { sanitizeHtml } from '@/utils/utils' const canEdit = ref(false) const ctrlKey = ref(17) @@ -160,6 +161,8 @@ const init = () => { } }, 1000) } +const sanitizedPropValue = computed(() => sanitizeHtml(element.value['propValue'] || '')) + onMounted(() => { init() }) @@ -184,11 +187,11 @@ onMounted(() => { @mousedown="handleMousedown" @blur="handleBlur" @input="handleInput" - v-html="element['propValue']" + v-html="sanitizedPropValue" >