I have a web application game where i have some text stored in a database. Java/JDBC is used to get the text from a database and store it in an Arraylist. The Arraylist is sent to the client where a JSTL forEach loop is used to convert the Arraylist into a Javascript array of strings using <c:out value="eachString">
During the game, i use a HTML canvas, and i print the value of these strings onto the canvas using context.fillText().
However, because <c:out>
automatically escapes things, when the text is printed out - the following sort of sentence is printed:
They couldn't do it
instead of:
they couldn't do it.
So i was wondering is there some kind of function or easy method i could use which would take the text passed to the fillText method and translate all the entity references into their actual values.