Skip to content

[CS2] Interpolated strings containing backticks are not properly escaped. #4380

@TheBITLINK

Description

@TheBITLINK

If a backtick is found inside an interpolated string, it doesn't get escaped, causing syntax errors.

Input:

console.log("This is a test: `#{process.pid}`")

Result:

console.log(`This is a test: `${process.pid}``);

Expected result:

console.log(`This is a test: \`${process.pid}\``);

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions