Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
text/template: JSEscape generates invalid JSON #37634
What version of Go are you using (
We were just lucky not to hit those characters in our use case which is writing a JSON document with values that are PEM-formatted certificates (
I confirm this is intended behavior as JSEscape was only designed to be used to escape JS and not JSON. The fact that you were lucky not to hit escaping with b64 was just a coincidence and was not intended.
That said I undestand your pain and I would like to ask for a little bit more information before I try to address this: