Skip to content

fix: RawParser doesn't escape JSON control characters (0x00-0x1F) #132

Closed

Description

@strawgate

RawParser in format.rs only escapes ", \, \n, \r, \t. Other control characters (0x00-0x08, 0x0B, 0x0C, 0x0E-0x1F) pass through raw, producing invalid JSON per RFC 8259.

Fix

Add: b if b < 0x20 => write!(out, "\\u{:04x}", b) to the escape match.

Activity

  1. strawgate commented on Mar 30, 2026

    @strawgate
    OwnerAuthor

    Fixed by PR #136 (cleanup pass).

  2. strawgate commented on Mar 30, 2026

    @strawgate
    OwnerAuthor

    Fixed by PR #136 (cleanup pass — RawParser now escapes control chars).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions