Skip to content

Bug: ' is incorrectly treated as delimiter inside a double quoted attribute #2

@king8fisher

Description

@king8fisher

/([\w:.-]+)\s*=\s*["'](.*?)["']/g used in decrypting attributes will incorrectly deal with the attributes containing ' character as delimiter.

Test cases:
<element attribute='This is a "double quote" inside single quotes'></element>

<element attribute="This is a 'single quote' inside double quotes"></element>

<element attribute='This is an apostrophe: &apos;'></element>

<element attribute="This is a &quot;double quote&quot; inside double quotes"></element>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions