Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mgreter opened this issue Mar 22, 2016 · 0 comments
Open

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

mgreter opened this issue Mar 22, 2016 · 0 comments

Comments

@mgreter
Copy link
Contributor

mgreter commented Mar 22, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant