Javascriptlet evaluates backslash escape codes in variables
The Javascriptlet action changes the values of variables that contain backslash escape codes by evaluating them, even if the JavaScript code doesn't touch that variable.
This task demonstrates the problem:
Bug in Javascriptlet (127)
<Other backslash codes also break>
A1: Variable Set [ Name:%data To:\\ Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 ]
<Stores 2>
A2: Test Variable [ Type:Length Data:%data Store Result In:%data_length ]
<Code must contain an identifier, even if it is commented out.>
A3: JavaScriptlet [ Code:// something Libraries: Auto Exit:On Timeout (Seconds):45 ]
<Stores 1>
A4: Test Variable [ Type:Length Data:%data Store Result In:%data_length_after ]
A5: Flash [ Text:Not good!
%data_length vs %data_length_after Long:Off ] If [ %data_length != %data_length_after ]
I originally ran into this while trying to parse some JSON retrieved via HTTP Request. Sometimes it worked and sometimes it didn't, and the times it didn't were when one of the fields in the JSON data contained a "\\". That seems to indicate this happens before the code actually runs (probably while "importing" local variables to the JS), thereby invalidating the JSON (since the character behind the resulting single "\" wasn't valid in JSON).
I'm using 59.3.beta.2, but I didn't go back to the non-beta version to check if it used to work before. I also didn't check whether the Javascript action has the same bug.