jQUery - insert inside label
Use .html()
instead of .text()
.
Be careful with using .html()
or the same methods using another framework/library (e.g v-html
in Vue.js), because it has XSS vulnerability. Read more about XSS from this answer.
Working way via .text():
You can simply replace
with \xa0
for text messages.