Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

83
Views
JSON passes newline as %5C instead of \n

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:

  • Internet search. Lot of \n issues/solutions, but not non of them applicable to my case.
  • Confirmed that JSON was passed newline as \n before and now it %5C.
  • Tried making \\n as online research suggested.

Thank you for reading. I appreciate your time!

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!