Wikipedia:Reference desk/Archives/Computing/2020 September 3

= September 3 =

C# and JavaScript question
At work, I've come across a C# method that is writing a string to be directly inserted into a JavaScript function. The JavaScript function is supposed to handle the inserted content as a simple string. The JavaScript function is something like this:

which is Razor syntax that executes  first and then inserts the result directly into.

Now, to avoid JavaScript syntax errors,  escapes   into ,   into   and   into.

My question is first, is this enough? And second, is there an easier way to do this, preferably some ready-existing way to escape strings? J I P &#124; Talk 00:53, 3 September 2020 (UTC)


 * @JIP, if possible, and you're using ECMAScript 6 (i.e. the JavaScript engine you're using is from the past 5 or so years) you might prefer to use backticks (`) to pass in your string parameter. These support a whole manner of characters, including newlines,
 * e.g. instead of using  you'd use  . If backticks don't work for you, escaping JavaScript strings is easy, and you have two options: you can use a JSON parsing library (many, many of these about, depending on your flavour of C#, for .NET I'd use system.text.json) and use their string parsing function (keep in mind you're adding a whole JSON library, which you might not use past this), or the probably more economical option of using just a subroutine that does this for you. This Stackoverflow thread contains many examples that you may find useful. Hope this helps :) Ed   talk!  20:25, 3 September 2020 (UTC)

What are The "FBI Triple I Teletype" and "Wisconsin Circuit Court Automated Program"?
In the charging  document by ADA Carli McNeill of Kyle Rittenhouse, these terms are used in the last sentence. Google shows they’re not novel, but only turns up 60 hits (Only 60 documents with both of those terms, A few of which are said charging document.) After I couldn’t find the first term on Wikipedia, I felt at a dead end and thought I’d ask here betting that other people are wondering the same thing. --50.201.195.170 (talk) 18:47, 3 September 2020 (UTC)


 * Interstate Identification Index -- Finlay McWalter··–·Talk 22:31, 3 September 2020 (UTC)


 * Thanks x 2! (Edited accordingly.) --50.201.195.170 (talk) 16:01, 11 September 2020 (UTC)


 * Wisconsin CCAP -- Finlay McWalter··–·Talk 22:32, 3 September 2020 (UTC)