Skip to content

Compression fails when using String.htmlSpecialChars() #10

@paavo

Description

@paavo

Exception when using String.htmlSpecialChars on a Document
Probably fails because HtmlMin can't handled Encoded HTML 🤔

To Reproduce
Use String.htmlSpecialChars() to encode some HTML-Code like:

renderer = afx`
    <code>{String.htmlSpecialChars('<Vendor.Project:Helper.Link ... />')}</code><br/>
`

Error

Exception #1 in line 1717 of .../Packages/Libraries/voku/html-min/src/voku/helper/HtmlMin.php: Warning: Attempt to read property "nodeValue" on null in .../Packages/Libraries/voku/html-min/src/voku/helper/HtmlMin.php line 1717

49 Neos\Flow\Error\ErrorHandler::handleError(2, "Attempt to read property "nodeValue" on null", ".../voku/html-min/src/voku/helper/HtmlMin.php", 1717)
48 voku\helper\HtmlMin::protectTagHelper(voku\helper\HtmlDomParser, "code")
47 voku\helper\HtmlMin::protectTags(voku\helper\HtmlDomParser)

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