Skip to content

HTML::Parser settings cannot be overridden from outside pQuery #10

Open
@mgreter

Description

@mgreter

As the title says, I'm not able to override HTML::Parser settings for pQuery. My main problem is that due to ignore_unknown beeing set, all HTML5 tags are ignored. I think this is due to HTML::Tagset not supporting any of the new HTML5 tags (see issue 67299 and 63059). IMO it make sense to allow users to override any of the default settings anyway. I can see that _builder would accept custom settings, but fromHTML etc. do not supply any arguments, so there doesn't seem to be any way to change them from the outside. Will also provide a PR with a possible fix for this in a moment.

use pQuery;
use HTML::TreeBuilder 5 -weak;
my $pQuery = pQuery('<html><body><header>header</header></body></html>');
warn $pQuery->find('header')->html();

Warning: something's wrong at test.pl line 4.

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