I am using backbone.js with underscore.js
In my template I have the following textarea
<textarea id="MyHtml" rows="10" cols="75" name="MyHtml"><%= MyHtml %></textarea>
Now the issue is if my model's MyHtml has any ascii character it html decodes it and renders it. To know exactly what i mean check this fiddle.
How do I use the above template and still prevent this ?
Inside your UnderScore Templates use minus sign ("-") for binding value to your html field instead of equals ("=") For eg.
<textarea id="MyHtml" rows="10" cols="75" name="MyHtml"><%- MyHtml %></textarea>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With