Skip to content

DomDocument / libxml2 failing to parse HTML5 #21

@emilhdiaz

Description

@emilhdiaz

Hi Mike!

We've been noticing quite a few problems when trying to parse pages that contain HTML5 tags. Seems that libxml2, which PHP's DomDocument uses under the hood, only has support for up to HTML4. For example parsing fails on http://bsugarmama.com/3-layer-french-vanilla-pudding-cake-chocolate-fudge-frosting/

See the following bug reports:
https://www.drupal.org/node/1333730
https://bugs.php.net/bug.php?id=60021

We've been successfully experimenting with Mastermind's HTML5-PHP parser:
https://github.com/Masterminds/html5-php
http://engineeredweb.com/blog/2013/introducing-html5-parser-serializer-php/

Just wondering if you've run into this issue before and if you think it'd be worth to switch the parser for OneTSP?

  • Emil

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