Passing an HTML string to jQuery function
<p>I'm working on an application which retrieves some HTML code from a record in a database. That strings then gets taken and inserted inside of a specific div. Right now I'm accomplishing this by passing the variable from Java and printing it within the div in the JSP. Now I'm trying to use an external jQuery function to accomplish this task and I'm struggling with how to pass this String to the jQuery function.</p>

<p>I tried something like this:</p>

<pre><code>&lt;script&gt;
var message = &lt;%=message %&gt;;
&lt;/script&gt;
&lt;script src="files/js.js" type="text/javascript"&gt;&lt;/script&gt;
</code></pre>

<p>But it can't seem to interpret the var once it hits the external function (I tried using StringEscapeUtils but that didn't fix the issue). </p>
