Package: libgumbo2
Version: 0.12.3+dfsg-1
Severity: grave
Justification: renders package unusable

After the to 0.12.3+dfsg-1, libgumbo2 misses the html element.
This is a major regression. For instance, this has the effect
to generate invalid XML files.

To reproduce, consider the following Perl script:

------------------------------------------------------------
#!/usr/bin/env perl

use strict;
use HTML::Gumbo;

sub parse ($)
  {
    my ($html) = @_;

    HTML::Gumbo->new->parse
      ($html, format => 'callback', callback => sub
       {
         my ($event) = shift;
         print "Event: $event\n";
         if ($event =~ /^document (start|end)$/ )
           { }
         elsif ($event eq 'start' )
           {
             my ($tag, $attr) = @_;
             print "  Tag: <$tag>\n";
             while (@$attr)
               {
                 @$attr >= 2 or die;
                 my $name = $attr->[0];
                 print "  Att: $name=\"$attr->[1]\"\n";
               }
           }
       }
      );
  }

parse(do { local $/; <> });
------------------------------------------------------------

With libgumbo2 0.12.3+dfsg-1, I get:

qaa:~> echo "" | ./parse
Event: document start
Event: start
  Tag: <head>
Event: end
Event: start
  Tag: <body>
Event: end
Event: document end

Note: the html element is missing, even when present in the source file:

qaa:~> echo "<html><head></head><body></body></html>" | ./parse
Event: document start
Event: start
  Tag: <head>
Event: end
Event: start
  Tag: <body>
Event: space
Event: end
Event: document end

Compare to libgumbo2 0.12.0+dfsg-2+b1:

zira:~> echo "" | ./parse
Event: document start
Event: start
  Tag: <html>
Event: start
  Tag: <head>
Event: end
Event: start
  Tag: <body>
Event: end
Event: end
Event: document end

-- System Information:
Debian Release: trixie/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'stable-updates'), (500, 
'stable-security'), (500, 'stable-debug'), (500, 'proposed-updates-debug'), 
(500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 6.12.5-amd64 (SMP w/16 CPU threads; PREEMPT)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages libgumbo2:amd64 depends on:
ii  libc6  2.40-5

libgumbo2:amd64 recommends no packages.

libgumbo2:amd64 suggests no packages.

-- no debconf information

-- 
Vincent Lefèvre <vinc...@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

Reply via email to