Skip to content

parser: Does not support HTML-like Comments (ECMAScript Annex B) #18392

@timokoessler

Description

@timokoessler

Description

We use the parser in a security library to detect code injections. A bug bounty hunter found a bypass using HTML-like comments, which are supported by Node.js (V8), but cannot be parsed by OXC.

If Annex B is not implemented intentionally, please close this issue.

Expected Behavior

OXC should parse the following code:

<!-- Test -->
console.log("Hello, world!");
<!-- Test
console.log("Hello, world!");

Links

Metadata

Metadata

Assignees

Labels

Type

Priority

None yet

Effort

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions