mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
fix(editor): stop rendering expressions as html (#4420)
* fix(editor): don't render expr as html * fix highlight bug
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
<template>
|
||||
<n8n-text size="small" color="text-base" tag="div" v-if="hint">
|
||||
<div ref="hint" :class="{[$style.hint]: true, [$style.highlight]: highlight}" v-html="hint"></div>
|
||||
<div v-if="!renderHTML" :class="{[$style.hint]: true, [$style.highlight]: highlight}">{{ hint }}</div>
|
||||
<div v-else ref="hint" :class="{[$style.hint]: true, [$style.highlight]: highlight}" v-html="sanitizeHtml(hint)"></div>
|
||||
</n8n-text>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { sanitizeHtml } from "@/utils";
|
||||
import Vue from "vue";
|
||||
|
||||
export default Vue.extend({
|
||||
@@ -16,6 +18,13 @@ export default Vue.extend({
|
||||
highlight: {
|
||||
type: Boolean,
|
||||
},
|
||||
renderHTML: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
sanitizeHtml,
|
||||
},
|
||||
mounted(){
|
||||
if(this.$refs.hint){
|
||||
|
||||
Reference in New Issue
Block a user