WebReflection / WebReflection/linkedom
`>` inside scripts get escaped.
Open
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 2.1k
- Forks
- 104
- PR merge metrics
- No merged PRs in 30d
Description
> const { DOMParser } = require("linkedom");
undefined
> const parser = new DOMParser();
undefined
> parser.parseFromString(`<html><body><script>(() => {if (5>4) { console.log('hello') }})()</script></body></html>`).toString()
`<?xml version="1.0" encoding="utf-8"?><html><body><script>(() => {if (5>4) { console.log('hello') }})()</script></body></html>`
It should be () => { and 5>4
I'm using linkedom@0.14.25
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with DOMParser.parseFromString and the serialized document's toString() output, using the script content shown in the report. Trace the script serialization path and verify that greater-than characters in JavaScript remain unescaped. Done means the output preserves both () => and 5>4 inside the script element.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100