`deno task debug` fails when a variable name string contains any double-quotes.
The `deno task debug` task as mentioned in this project's [README.md](https://github.com/denoland/deno_doc/blob/main/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.
https://github.com/denoland/deno_doc/blob/86650327e652fe076e3b25ef94564dee20088a63/tests/testdata/multiple/a.ts#L46
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
```
2 条评论