Displaying 1 result from an estimated 1 matches for "error_desc".
Did you mean:
error_descs
2008 Dec 09
2
unterminated string literal, how to properly send strings
I have a line like the following in my Rails view/template (generating
JavaScript):
<script type="text/javascript">
...
y = escape(''<%= h(e.error_desc) %>'');
...
</script>
Because some of the error_descs have newlines, the browser is
receiving page code that looks like this:
y = escape(''Information about the error.
Another line in the description.
A third line in the description string.'');
JavaScript is chok...