We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Is your feature request related to a problem? By using ctx.JSON(), it would always do HTML escape because it's the default behavior of json.Marshal().
app.Get("/json", func(c *fiber.Ctx) { c.Status(fiber.StatusOK).JSON(map[string]string{ "message": "<foo> hello&", }) })
$ curl localhost:8080/json {"message":"\u003cfoo\u003e hello\u0026"}
Describe the solution you'd like Add a new function which would use a custom json encoder by SetEscapeHTML(false). gin's implementation
SetEscapeHTML(false)
Currently, I need to implement this in app side then set the body manually.
I would love to support this PR if you want to add this feature. Thanks
The text was updated successfully, but these errors were encountered:
#693 (comment)
Sorry, something went wrong.
No branches or pull requests
Is your feature request related to a problem?
By using ctx.JSON(), it would always do HTML escape because it's the default behavior of json.Marshal().
Describe the solution you'd like
Add a new function which would use a custom json encoder by
SetEscapeHTML(false)
.gin's implementation
Currently, I need to implement this in app side then set the body manually.
I would love to support this PR if you want to add this feature.
Thanks
The text was updated successfully, but these errors were encountered: