Skip to content

C1 control characters not escaped by formatter #29450

@dd-pardal

Description

@dd-pardal
  • Version: v10.15.1
  • Platform: Windows 10 Home 1903 32bit
  • Subsystem: internal/util/inspect

The C1 control codes and DEL (0x7f-0x9f, inclusive) are not escaped by the inspect formatter, which can affect the terminal behavior and insert line breaks (for example NEL, 0x85).

For example:

console.log("%O", "\x9b");
// Logs a single quote instead of '\u009b' or '\x9b'

Also, why not use \xXX instead of \u00XX?

Metadata

Metadata

Assignees

No one assigned

    Labels

    utilIssues and PRs related to the built-in util module.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions