Closed Corion closed 4 years ago
Files with Coverage Reduction | New Missed Lines | % | ||
---|---|---|---|---|
lib/WWW/Mechanize.pm | 41 | 93.95% | ||
<!-- | Total: | 41 | --> |
Totals | |
---|---|
Change from base Build 336: | 0.04% |
Covered Lines: | 758 |
Relevant Lines: | 804 |
@Corion would you be able to rebase this? I merged a much older PR just now that touches the same code.
No problem - the rebased version passes tests locally, let's see if it also passes tests on CI
Thanks @Corion!
This changes the HTML parser behaviour to properly respect CDATA[[ sections and to ignore link tags in Javascript code.
The old behaviour can be restored by passing undef as the "marked_sections" option when creating the WWW::Mechanize object:
The patch also includes a (nasty) test file to check the old and new behaviour
See also the discussion in https://perlmonks.org/?node_id=11116478 and https://gist.github.com/haukex/fd76efa16f0b07ce6a7441d9b2265b2a for more context