Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no html escaping #5

Closed
malud opened this issue Sep 24, 2019 · 1 comment
Closed

no html escaping #5

malud opened this issue Sep 24, 2019 · 1 comment

Comments

@malud
Copy link
Collaborator

malud commented Sep 24, 2019

echo-json escapes html chars (&<>)

❯ go run echo-json.go asdf "value&asdf>"
{"asdf":"value\u0026asdf\u003e"}

expected: {"asdf": "value&asdf>"}

Maybe as escape option which is disabled by default.

See: https://golang.org/pkg/encoding/json/#Encoder.SetEscapeHTML

malud added a commit that referenced this issue Feb 7, 2020
use json.Encoder to avoid HTML encoding in JSON #5
@filex
Copy link
Owner

filex commented Feb 15, 2020

solved in #6

@filex filex closed this as completed Feb 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants