Skip to content

All strings must be XML compatible: Unicode or ASCII, no NULL bytes or control characters #117

Closed
@aleray

Description

@aleray

Hi,

I had this error today. I actually introduced the illegal character and fixed the problem at the input level. I'm just wondering if it should be handled by the lib though...

import html5lib

src = u"\x01"

parser = html5lib.HTMLParser(tree=html5lib.treebuilders.getTreeBuilder("lxml"), namespaceHTMLElements=False)
tree = parser.parseFragment(src, container="div")

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions