Skip to content

json.dart doesn't escape all control characters #1850

Closed
@DartBot

Description

@DartBot

This issue was originally filed by [email protected]


In json.dart, the functions _needsEscape and _escape fail to deal with control characters other than new line '\n' and carriage return '\r' (incorrectly referred to in the source code a sLINE_FEED -- which is a synonym for newline).

According to the JSON specification, all control characters (char codes between 0 and 31) must be escaped, either as \b, \f, \n, \r, \t or as \uxxxx.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-core-librarySDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions