r38339 - in /branches/upstream/libhtml-parser-perl/current: Changes META.yml Parser.pm TODO eg/hanchors hparser.c t/skipped-text.t

carnil-guest at users.alioth.debian.org carnil-guest at users.alioth.debian.org
Sun Jun 21 14:17:53 UTC 2009


Author: carnil-guest
Date: Sun Jun 21 14:17:47 2009
New Revision: 38339

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=38339
Log:
[svn-upgrade] Integrating new upstream version, libhtml-parser-perl (3.61)

Modified:
    branches/upstream/libhtml-parser-perl/current/Changes
    branches/upstream/libhtml-parser-perl/current/META.yml
    branches/upstream/libhtml-parser-perl/current/Parser.pm
    branches/upstream/libhtml-parser-perl/current/TODO
    branches/upstream/libhtml-parser-perl/current/eg/hanchors
    branches/upstream/libhtml-parser-perl/current/hparser.c
    branches/upstream/libhtml-parser-perl/current/t/skipped-text.t

Modified: branches/upstream/libhtml-parser-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-parser-perl/current/Changes?rev=38339&op=diff
==============================================================================
--- branches/upstream/libhtml-parser-perl/current/Changes (original)
+++ branches/upstream/libhtml-parser-perl/current/Changes Sun Jun 21 14:17:47 2009
@@ -1,3 +1,18 @@
+_______________________________________________________________________________
+2009-06-20  Release 3.61
+
+Gisle Aas (2):
+      Test that triggers the crash that Chip fixed
+      Complete documented list of literal tags
+
+Chip Salzenberg (1):
+      Avoid crash (referenced pend_text instead of skipped_text)
+
+Antonio Radici (1):
+      Reference HTML::LinkExttor [RT#43164]
+
+
+
 _______________________________________________________________________________
 2009-02-09  Release 3.60
 

Modified: branches/upstream/libhtml-parser-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-parser-perl/current/META.yml?rev=38339&op=diff
==============================================================================
--- branches/upstream/libhtml-parser-perl/current/META.yml (original)
+++ branches/upstream/libhtml-parser-perl/current/META.yml Sun Jun 21 14:17:47 2009
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:               HTML-Parser
-version:            3.60
+version:            3.61
 abstract:           HTML parser class
 author:
     - Gisle Aas <gisle at activestate.com>

Modified: branches/upstream/libhtml-parser-perl/current/Parser.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-parser-perl/current/Parser.pm?rev=38339&op=diff
==============================================================================
--- branches/upstream/libhtml-parser-perl/current/Parser.pm (original)
+++ branches/upstream/libhtml-parser-perl/current/Parser.pm Sun Jun 21 14:17:47 2009
@@ -9,7 +9,7 @@
 use strict;
 use vars qw($VERSION @ISA);
 
-$VERSION = "3.60";
+$VERSION = "3.61";
 
 require HTML::Entities;
 
@@ -690,7 +690,7 @@
 Dtext causes the decoded text to be passed.  General entities are
 automatically decoded unless the event was inside a CDATA section or
 was between literal start and end tags (C<script>, C<style>,
-C<xmp>, C<iframe> and C<plaintext>).
+C<xmp>, C<iframe>, C<title>, C<textarea> and C<plaintext>).
 
 The Unicode character set is assumed for entity decoding.  With Perl
 version 5.6 or earlier only the Latin-1 range is supported, and
@@ -709,7 +709,7 @@
 
 Is_cdata causes a TRUE value to be passed if the event is inside a CDATA
 section or between literal start and end tags (C<script>,
-C<style>, C<xmp>, C<iframe> and C<plaintext>).
+C<style>, C<xmp>, C<iframe>, C<title>, C<textarea> and C<plaintext>).
 
 if the flag is FALSE for a text event, then you should normally
 either use C<dtext> or decode the entities yourself before the text is

Modified: branches/upstream/libhtml-parser-perl/current/TODO
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-parser-perl/current/TODO?rev=38339&op=diff
==============================================================================
--- branches/upstream/libhtml-parser-perl/current/TODO (original)
+++ branches/upstream/libhtml-parser-perl/current/TODO Sun Jun 21 14:17:47 2009
@@ -7,7 +7,8 @@
  - implement backslash escapes in literal argspec string
  - <![%app1;[...]]> (parameter entities)
  - make literal tags configurable.  The current list is hardcoded
-   to be ""script", "style", "title", "textarea", "xmp", and "plaintext".
+   to be "script", "style", "title", "iframe", "textarea", "xmp",
+   and "plaintext".
 
 SGML FEATURES WE WILL PROBABLY IGNORE FOREVER
  - Empty tags: <> </>  (repeat previous start tag)

Modified: branches/upstream/libhtml-parser-perl/current/eg/hanchors
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-parser-perl/current/eg/hanchors?rev=38339&op=diff
==============================================================================
--- branches/upstream/libhtml-parser-perl/current/eg/hanchors (original)
+++ branches/upstream/libhtml-parser-perl/current/eg/hanchors Sun Jun 21 14:17:47 2009
@@ -2,6 +2,8 @@
 
 # This program will print out all <a href=".."> links in a
 # document together with the text that goes with it.
+#
+# See also HTML::LinkExtor
 
 use HTML::Parser;
 

Modified: branches/upstream/libhtml-parser-perl/current/hparser.c
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-parser-perl/current/hparser.c?rev=38339&op=diff
==============================================================================
--- branches/upstream/libhtml-parser-perl/current/hparser.c (original)
+++ branches/upstream/libhtml-parser-perl/current/hparser.c Sun Jun 21 14:17:47 2009
@@ -658,7 +658,7 @@
 	else {
 	    SV *tmp = newSVpvn(beg, end - beg);
 	    sv_utf8_upgrade(tmp);
-	    sv_catsv(p_state->pend_text, tmp);
+	    sv_catsv(p_state->skipped_text, tmp);
 	    SvREFCNT_dec(tmp);
 	}
 #endif

Modified: branches/upstream/libhtml-parser-perl/current/t/skipped-text.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-parser-perl/current/t/skipped-text.t?rev=38339&op=diff
==============================================================================
--- branches/upstream/libhtml-parser-perl/current/t/skipped-text.t (original)
+++ branches/upstream/libhtml-parser-perl/current/t/skipped-text.t Sun Jun 21 14:17:47 2009
@@ -1,4 +1,4 @@
-use Test::More tests => 3;
+use Test::More tests => 4;
 
 use strict;
 use HTML::Parser;
@@ -72,3 +72,18 @@
 #diag join(":", @x);
 is(join(":", @x), "X::a a:X:<a>:b bc c:X:<x>:d de:Y:");
 
+#
+# The crash that Chip found
+#
+
+my $skipped;
+$p = HTML::Parser->new(
+    ignore_tags => ["foo"],
+    start_h => [sub {$skipped = shift}, "skipped_text"],
+);
+
+$p->parse("\x{100}<foo>");
+$p->parse("plain");
+$p->parse("<bar>");
+$p->eof;
+is($skipped, "\x{100}<foo>plain");




More information about the Pkg-perl-cvs-commits mailing list