Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

toml-node allows escape sequences not defined in the TOML spec in double quoted strings #49

Copy link
Copy link
@iarna

Description

@iarna
Issue body actions

This appears to have been introduced by: #21

To sum up the problem:

Given the following TOML:

["the\ key"]

one = "one"
two = 2
three = false

This library produces:

{"the\\ key":{"one":"one","two":2,"three":false}}

In contrast, it should produce an error, per the spec:

All other escape sequences not listed above are reserved and, if used, TOML should produce an error.

Restoring this to an error would make this library's behavior consistent with toml-j0.4 and @iarna/toml.

Valid TOML with a slash in the key name would be either of these:

["the\\ key"]

one = "one"
two = 2
three = false

or Edit: The one below seems to be an extension that's on the 1.0 track, but not in 0.4. It's currently supported, however.

['the\ key']

one = "one"
two = 2
three = false
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.