I want to convert a java variable(containing newline and other special characters) from server side sent to JSP to javascript variable.
In my JSP,
var test = '${educationDescription}';
alert(test);
Value of educationDescription sent from server side is
This is
test
containing newline
and other special chars like " & ; etc
But I am getting javascript error for the above code snippet.