I have some js code which renders the following HTML
<div contenteditable="false" tabindex="0" class="ProseMirror">
<p> didn't project a significant increase</p>
</div>
In the browser, it actually displays the characters #039;
instead of converting it to '
is there a way to force/prevent the browser from doing this conversion?
When rendering an HTML entity, it may need to be compiled. You can use one of these options:
<p> didn{{ `'` }}t project a significant increase</p>
v-html
<p> didn<span v-html="`'`"></span>t project a significant increase</p>
Note that these first two examples are using a template literal, not single quotes.
If using a render function, you can set the innerHTML
domProps
:
render(h) {
return h('span', {
domProps: {
innerHTML: 'didn't project a significant increase'
}
});
}
Here is a demo
Original
You're missing an &
, it should be:
<p> didn't project a significant increase</p>