I am encoding in the DB some characters (", \) with their unicode values (" , \). When I display those fields in HTML they are displayed fine, but when I put the in
<input type="text"> elements I get the information displayed with the actual value from the DB (" , \) instead of their decoded value (", \).
How do I display the decoded value of Unicode characters in input type text elements?
It turned out it was a Spring option (attribute
htmlEscape) that escaped HTML content server side on the input fields.When I set that attribute on the input fields to false, the sequence
"wasn’t escaped anymore and the character on the response received by the client was instead".Unfortunately I didn’t specify in the question that the input type tag on the JSP was a Spring specific, instead of the HTML one, because I didn’t think that is a key factor in the problem.