go-chi / go-chi/render

Redundant escapeHTML Setting in go-chi/render

Open
#52 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
339
Forks
66
PR merge metrics
No merged PRs in 30d

Description

https://github.com/go-chi/render/blob/14f1cb3d5c2969d6e462632a205eacb6421eb4dc/responder.go#L95C2-L96C25

In the `responder.go` file, the JSON function sets `escapeHTML` to true.
However, the `json.NewEncoder` defaults to `escapeHTML: true`.
This appears to be redundant.

Source code for json.NewEncoder:
```
func NewEncoder(w io.Writer) *Encoder {
return &Encoder{w: w, escapeHTML: true}
}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.