I have a cfml struct, like below:
<cfscript>
jsonThing=structnew()
jsonThing.header = "sometext\nsome more\none more line";
jsonThing.phone = "(123) 456-6789";
jsonThing.city="Nukus";
jsonThing.state="Coolest one";
jsonThing.zipcode="74000-6000";
jsonThing.descript=#description#; //array;
jsonThing.descript2=#description2#; //array;
</cfscript>
A custom protocol cstprt has been created and deployed on the client computers (PC, Windows 10).
JSON is sent to clients:
function cstprt() {
window.location.href='cstprt:/<cfoutput>#SerializeJSON(jsonThing)#</cfoutput>';}
cstprt();
Then a desktop app receives this JSON and prints out it on a receipt printer.
It was working fine until Firefox update v.95 came up. Everything else works still fine, except \n now comes as %5C on the receiving end.
I am not sure if this because of the Firefox update or some Windows update.
Firefox a must browser for us.
Question is how to make JSON to pass newline as \n again? Please share your expertise.
What I have done so far:
\n issues/solutions, but not non of them applicable to my case.\n before and now it %5C.\\n as online research suggested.Thank you for reading. I appreciate your time!