Reputation: 253
I want to display a string in input value. That string contain double quotes. I want to display it as it is. Its developed with Python
<input id="answer" name="answer" type="text" value="<%= element.answer %>" />
My string content is Testing "quotes" test
When its displayed in input field, it shows only Testing because of double quotes issue.
I have tried escape(element.answer)
to display it. But it shows this result
Testing%20%22quotes%22%20test
I want to display the exact content. Pllease help
Upvotes: 0
Views: 750
Reputation: 253
Thanks. Got solution for this problem
Instead of this <%= element.answer %>
I have changed it to <%- element.answer %>
It works fine now
Upvotes: 1