Skip to content

Redundant escapeHTML Setting in go-chi/render #52

@knbr13

Description

@knbr13

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}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions