Skip to content

C1 control characters not escaped by formatter #29450

Closed

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?

Activity

  1. added
    utilIssues and PRs related to the built-in util module.
    on Sep 5, 2019
  2. changed the title [-]C1 control codes not escaped by formatter[/-] [+]C1 control characters not escaped by formatter[/+] on Sep 5, 2019
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

    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