HTML::TokeParser leaves numeric entities undecoded in attribute values

Abierto
#1,457 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
72/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
perl
Área
compilers

Línea de trabajo

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'.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

area:cpan-port bug

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=&#39;result.html&#39;" />

The plugin expects HTML::TokeParser to expose the attribute as:

0; url='result.html'

Under PerlOnJava, the attribute remains:

0; url=&#39;result.html&#39;

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 &#39;, and retain the WWW::Mechanize::Plugin::FollowMetaRedirect fixture as integration coverage.

Lenguaje dominante
Perl
Estrellas
64
Forks
6
Merge medio
5 h 25 min
PR fusionados (30 d)
157

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de fglock/PerlOnJava

Todos los issues de fglock/PerlOnJava

Issues similares

Más issues de Perl

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.