HTML::TokeParser leaves numeric entities undecoded in attribute values
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 72/100
Research direction
Start with the HTML::TokeParser behavior described in the issue and the stable failing test t/01_meta-format.t; use the WWW::Mechanize::Plugin::FollowMetaRedirect fixture as integration coverage. Add focused coverage for numeric entity decoding in start-tag attributes, then run the plugin tests on both PerlOnJava backends and confirm the attribute becomes 0; url='result.html'.
Written by the indexing model from the issue text.
Description
Summary
PerlOnJava's HTML::TokeParser does not decode numeric character references in HTML attribute values. This breaks WWW::Mechanize::Plugin::FollowMetaRedirect when a meta-refresh URL uses ' for an apostrophe.
Reproduction
Distribution: WWW-Mechanize-Plugin-FollowMetaRedirect-0.03
The upstream fixture contains:
<meta http-equiv="refresh" content="0; url='result.html'" />
The plugin expects HTML::TokeParser to expose the attribute as:
0; url='result.html'
Under PerlOnJava, the attribute remains:
0; url='result.html'
The plugin consequently requests a malformed file URL containing the literal entity and fails to load result.html.
Results
- Archived CPAN run:
20260918-141920-96054 - System Perl: PASS, 4 test files and 86 tests
- PerlOnJava JVM backend: FAIL
- PerlOnJava interpreter backend: FAIL
- Stable failing test:
t/01_meta-format.t - Other plugin tests pass; 52 subtests run successfully before the malformed URL aborts the test file.
Expected behavior
HTML::TokeParser should decode numeric character references in attribute values consistently with standard Perl. The plugin test should pass on both PerlOnJava backends.
Suggested regression coverage
Add focused HTML::TokeParser coverage for numeric entity decoding in start-tag attributes, especially ', and retain the WWW::Mechanize::Plugin::FollowMetaRedirect fixture as integration coverage.
- Dominant language
- Perl
- Stars
- 64
- Forks
- 6
- Avg merge
- 5h 25m
- Merged PRs (30d)
- 157
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from fglock/PerlOnJava
-
area:cpan-port area:unicode bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
fglock/PerlOnJava#1341 ·
-
area:cpan-port bug
Difficulty 4/5 3-5 days Newbie friendliness 44/100
fglock/PerlOnJava#1459 ·
-
bug high-impact
Difficulty 3/5 1-2 days Newbie friendliness 67/100
fglock/PerlOnJava#1456 · 1 comment ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 72/100
fglock/PerlOnJava#1455 ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 68/100
fglock/PerlOnJava#1454 ·
All issues in fglock/PerlOnJava
Similar issues
-
1.severity: security
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
api7/lua-resty-saml#63 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100