Skip to content
This repository was archived by the owner on Dec 15, 2025. It is now read-only.
This repository was archived by the owner on Dec 15, 2025. It is now read-only.

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

@kz-sher

Description

@kz-sher

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions