Skip to content

deno task debug fails when a variable name string contains any double-quotes. #724

@Ionaru

Description

@Ionaru

The deno task debug task as mentioned in this project's README.md, does not work without a change to the tests/testdata/multiple/a.ts file.

The error thrown:

thread 'main' panicked at examples\ddoc\main.rs:293:40:
called `Result::unwrap()` on an `Err` value: Os { code: 123, kind: InvalidFilename, message: "The filename, directory name, or volume label syntax is incorrect." }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: process didn't exit successfully: `target\debug\examples\ddoc.exe --name=gen_html --output generated_docs/ --html tests\testdata\multiple\a.ts tests\testdata\multiple\b.ts tests\testdata\multiple\c.ts` (exit code: 101)

Removing or commenting-out the line containing '"><img src=x onerror=alert(1)>' = 0;, fixes the issue.

'"><img src=x onerror=alert(1)>' = 0;

This seems to happen on any string containing a ": '"' = 0; also fails, while '' = 0; or 'A' = 0; succeeds.

To reproduce:

  1. Clone repo
  2. Run cargo build --all-targets
  3. Run deno task debug

Environment:

  System:
    OS: Windows 11 10.0.26100
  Managers:
    Cargo: 1.85.0 - ~\.cargo\bin\cargo.EXE
  Utilities:
    Git: 2.47.0.
  Languages:
    Rust: 1.85.0
    Deno: 2.3.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions