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

Wrong behavior in marshalling invalid UTF-8 byte with EscapeHTML=false #663

Open
kz-sher opened this issue Mar 9, 2023 · 0 comments
Open

Comments

@kz-sher
Copy link

kz-sher commented Mar 9, 2023

Background:

  • When EscapeHTML=true, marshalling invalid UTF-8 byte will yield \ufffd, which is correct.
  • When EscapeHTML=false, marshalling invalid UTF-8 byte will keep the original byte remaining the same, which is different from encoding/json.

Findings:

Sample:

@kz-sher kz-sher changed the title Invalid behavior in marshalling invalid UTF-8 byte with EscapeHTML=false Wrong behavior in marshalling invalid UTF-8 byte with EscapeHTML=false Mar 9, 2023
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

1 participant