diff --git a/web/public/js/components/common/keyword.js b/web/public/js/components/common/keyword.js
index a71ca05a..c19a487d 100644
--- a/web/public/js/components/common/keyword.js
+++ b/web/public/js/components/common/keyword.js
@@ -13,7 +13,7 @@ Vue.component("keyword", {
}
let slot = this.$slots["default"][0]
- let text = slot.text
+ let text = this.encodeHTML(slot.text)
if (word.length > 0) {
text = text.replace(new RegExp("(" + word + ")", "ig"), "$1")
}
@@ -23,5 +23,13 @@ Vue.component("keyword", {
text: text
}
},
+ methods: {
+ encodeHTML: function (s) {
+ s = s.replace("&", "&")
+ s = s.replace("<", "<")
+ s = s.replace(">", ">")
+ return s
+ }
+ },
template: ``
})
\ No newline at end of file