Skip to content

parser: DOM rendering doesn't escape single quotes in attributes #59

@dannywillems

Description

@dannywillems

Description

`crates/ironhtml-parser/src/dom.rs:382-389` — the parser's attribute rendering does not escape single quotes (`'`), while the builder's `escape_attr` escapes them to `'`.

This is an inconsistency between the two rendering paths that could lead to XSS in edge cases where attribute values contain single quotes and the HTML is rendered with single-quoted attributes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions