Skip to content

Disable escape HTML in JSON serialization#96

Open
amuwall wants to merge 1 commit intotidwall:masterfrom
amuwall:master
Open

Disable escape HTML in JSON serialization#96
amuwall wants to merge 1 commit intotidwall:masterfrom
amuwall:master

Conversation

@amuwall
Copy link

@amuwall amuwall commented Dec 4, 2025

When call Set and it use json.Marshal, it will auto escape HTML, such as <, >, &.
To avoid this, can use json.NewEncoder to generate a encoder and use enocder.SetEscapeHTML to disable it.

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

Successfully merging this pull request may close these issues.

1 participant