I need to initialize complex javascript code as an string. But that javascript code contains semicolon and " mark. I know I can escape " mark using \". But I don't know how to escape semicolon.
<script type="text/javascript"><!--
google_ad_client = "8888888888888";
/* Error Page Ads */
google_ad_slot = "8888888";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
I need to initialize above code as,
String complexString = "Above code here";
I can't concatenate slices of code, because that way ; will be removed. Right?
This is for Servlet. I may be foolish, but pardon me.