Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Your file contains special characters (probably a newline or a <code>'</code>) that cause the rendered Javascript to contain a syntax error.</p> <p>You need to escape the string using the <a href="http://antixss.codeplex.com/Wikipage" rel="nofollow noreferrer">Anti-XSS Toolkit</a>, like this:</p> <pre><code>var message = '&lt;%= AntiXss.JavaScriptEncode(CAnunturi.CPLATA_RAMBURS_INFO) %&gt;'; </code></pre> <p><strong>EDIT</strong>: If AntiXss doesn't help, try the following function:</p> <pre><code>public static void QuoteString(this string value, StringBuilder b) { if (String.IsNullOrEmpty(value)) return ""; var b = new StringBuilder(); int startIndex = 0; int count = 0; for (int i = 0; i &lt; value.Length; i++) { char c = value[i]; // Append the unhandled characters (that do not require special treament) // to the string builder when special characters are detected. if (c == '\r' || c == '\t' || c == '\"' || c == '\'' || c == '&lt;' || c == '&gt;' || c == '\\' || c == '\n' || c == '\b' || c == '\f' || c &lt; ' ') { if (b == null) { b = new StringBuilder(value.Length + 5); } if (count &gt; 0) { b.Append(value, startIndex, count); } startIndex = i + 1; count = 0; } switch (c) { case '\r': b.Append("\\r"); break; case '\t': b.Append("\\t"); break; case '\"': b.Append("\\\""); break; case '\\': b.Append("\\\\"); break; case '\n': b.Append("\\n"); break; case '\b': b.Append("\\b"); break; case '\f': b.Append("\\f"); break; case '\'': case '&gt;': case '&lt;': AppendCharAsUnicode(b, c); break; default: if (c &lt; ' ') { AppendCharAsUnicode(b, c); } else { count++; } break; } } if (b == null) { b.Append(value); } if (count &gt; 0) { b.Append(value, startIndex, count); } return b.ToString(); } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload