r46392 - in /trunk/libhtml-parser-perl: Changes META.yml Parser.pm Parser.xs README debian/changelog hparser.c hparser.h lib/HTML/Entities.pm t/uentities.t util.c
carnil-guest at users.alioth.debian.org
carnil-guest at users.alioth.debian.org
Sun Oct 25 20:56:58 UTC 2009
Author: carnil-guest
Date: Sun Oct 25 20:56:52 2009
New Revision: 46392
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=46392
Log:
New upstream release
Modified:
trunk/libhtml-parser-perl/Changes
trunk/libhtml-parser-perl/META.yml
trunk/libhtml-parser-perl/Parser.pm
trunk/libhtml-parser-perl/Parser.xs
trunk/libhtml-parser-perl/README
trunk/libhtml-parser-perl/debian/changelog
trunk/libhtml-parser-perl/hparser.c
trunk/libhtml-parser-perl/hparser.h
trunk/libhtml-parser-perl/lib/HTML/Entities.pm
trunk/libhtml-parser-perl/t/uentities.t
trunk/libhtml-parser-perl/util.c
Modified: trunk/libhtml-parser-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-parser-perl/Changes?rev=46392&op=diff
==============================================================================
--- trunk/libhtml-parser-perl/Changes (original)
+++ trunk/libhtml-parser-perl/Changes Sun Oct 25 20:56:52 2009
@@ -1,3 +1,15 @@
+_______________________________________________________________________________
+2009-10-25 Release 3.64
+
+Gisle Aas (5):
+ Convert files to UTF-8
+ Don't allow decode_entities() to generate illegal Unicode chars
+ Copyright 2009
+ Remove rendundant (repeated) test
+ Make parse_file() method use 3-arg open [RT#49434]
+
+
+
_______________________________________________________________________________
2009-10-22 Release 3.63
Modified: trunk/libhtml-parser-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-parser-perl/META.yml?rev=46392&op=diff
==============================================================================
--- trunk/libhtml-parser-perl/META.yml (original)
+++ trunk/libhtml-parser-perl/META.yml Sun Oct 25 20:56:52 2009
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: HTML-Parser
-version: 3.63
+version: 3.64
abstract: HTML parser class
author:
- Gisle Aas <gisle at activestate.com>
Modified: trunk/libhtml-parser-perl/Parser.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-parser-perl/Parser.pm?rev=46392&op=diff
==============================================================================
--- trunk/libhtml-parser-perl/Parser.pm (original)
+++ trunk/libhtml-parser-perl/Parser.pm Sun Oct 25 20:56:52 2009
@@ -1,6 +1,6 @@
package HTML::Parser;
-# Copyright 1996-2008, Gisle Aas.
+# Copyright 1996-2009, Gisle Aas.
# Copyright 1999-2000, Michael A. Chase.
#
# This library is free software; you can redistribute it and/or
@@ -9,7 +9,7 @@
use strict;
use vars qw($VERSION @ISA);
-$VERSION = "3.63";
+$VERSION = "3.64";
require HTML::Entities;
@@ -92,7 +92,7 @@
if (!ref($file) && ref(\$file) ne "GLOB") {
# Assume $file is a filename
local(*F);
- open(F, $file) || return undef;
+ open(F, "<", $file) || return undef;
binmode(F); # should we? good for byte counts
$opened++;
$file = *F;
Modified: trunk/libhtml-parser-perl/Parser.xs
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-parser-perl/Parser.xs?rev=46392&op=diff
==============================================================================
--- trunk/libhtml-parser-perl/Parser.xs (original)
+++ trunk/libhtml-parser-perl/Parser.xs Sun Oct 25 20:56:52 2009
@@ -1,5 +1,5 @@
/*
- * Copyright 1999-2005, Gisle Aas.
+ * Copyright 1999-2009, Gisle Aas.
* Copyright 1999-2000, Michael A. Chase.
*
* This library is free software; you can redistribute it and/or
Modified: trunk/libhtml-parser-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-parser-perl/README?rev=46392&op=diff
==============================================================================
--- trunk/libhtml-parser-perl/README (original)
+++ trunk/libhtml-parser-perl/README Sun Oct 25 20:56:52 2009
@@ -58,8 +58,8 @@
COPYRIGHT
- © 1995-2008 Gisle Aas. All rights reserved.
- © 1999-2000 Michael A. Chase. All rights reserved.
+ © 1995-2009 Gisle Aas. All rights reserved.
+ © 1999-2000 Michael A. Chase. All rights reserved.
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
Modified: trunk/libhtml-parser-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-parser-perl/debian/changelog?rev=46392&op=diff
==============================================================================
--- trunk/libhtml-parser-perl/debian/changelog (original)
+++ trunk/libhtml-parser-perl/debian/changelog Sun Oct 25 20:56:52 2009
@@ -1,14 +1,15 @@
-libhtml-parser-perl (3.63-1) UNRELEASED; urgency=low
-
- NOTE: an outstanding issue due to spelling of 'endianness'
- (complaint from lintian)
-
+libhtml-parser-perl (3.64-1) UNRELEASED; urgency=low
+
+ [ Jonathan Yu ]
* New upstream release
* Standards-Version 3.8.3 (drop perl version dependency)
* Add myself to Uploaders and Copyright
* Rewrote control description and harmonized the layout
- -- Jonathan Yu <jawnsy at cpan.org> Fri, 23 Oct 2009 06:38:01 -0400
+ [ Salvatore Bonaccorso ]
+ * New upstream release
+
+ -- Salvatore Bonaccorso <salvatore.bonaccorso at gmail.com> Sun, 25 Oct 2009 21:56:17 +0100
libhtml-parser-perl (3.62-1) unstable; urgency=low
Modified: trunk/libhtml-parser-perl/hparser.c
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-parser-perl/hparser.c?rev=46392&op=diff
==============================================================================
--- trunk/libhtml-parser-perl/hparser.c (original)
+++ trunk/libhtml-parser-perl/hparser.c Sun Oct 25 20:56:52 2009
@@ -1,5 +1,5 @@
/*
- * Copyright 1999-2008, Gisle Aas
+ * Copyright 1999-2009, Gisle Aas
* Copyright 1999-2000, Michael A. Chase
*
* This library is free software; you can redistribute it and/or
Modified: trunk/libhtml-parser-perl/hparser.h
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-parser-perl/hparser.h?rev=46392&op=diff
==============================================================================
--- trunk/libhtml-parser-perl/hparser.h (original)
+++ trunk/libhtml-parser-perl/hparser.h Sun Oct 25 20:56:52 2009
@@ -1,5 +1,5 @@
/*
- * Copyright 1999-2005, Gisle Aas
+ * Copyright 1999-2009, Gisle Aas
* Copyright 1999-2000, Michael A. Chase
*
* This library is free software; you can redistribute it and/or
Modified: trunk/libhtml-parser-perl/lib/HTML/Entities.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-parser-perl/lib/HTML/Entities.pm?rev=46392&op=diff
==============================================================================
--- trunk/libhtml-parser-perl/lib/HTML/Entities.pm (original)
+++ trunk/libhtml-parser-perl/lib/HTML/Entities.pm Sun Oct 25 20:56:52 2009
@@ -14,7 +14,7 @@
For example, this:
- $input = "vis-à-vis Beyoncé's naïve\npapier-mâché résumé";
+ $input = "vis-à -vis Beyoncé's naïve\npapier-mâché résumé";
print encode_entities($input), "\n"
Prints this out:
@@ -68,7 +68,7 @@
$string = "foo bar";
_decode_entities($string, { nb => "@", nbsp => "\xA0" }, 1);
- print $string; # will print "foo bar"
+ print $string; # will print "foo bar"
This routine is exported by default.
@@ -146,7 +146,7 @@
@EXPORT = qw(encode_entities decode_entities _decode_entities);
@EXPORT_OK = qw(%entity2char %char2entity encode_entities_numeric);
-$VERSION = "3.63";
+$VERSION = "3.64";
sub Version { $VERSION; }
require HTML::Parser; # for fast XS implemented decode_entities
Modified: trunk/libhtml-parser-perl/t/uentities.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-parser-perl/t/uentities.t?rev=46392&op=diff
==============================================================================
--- trunk/libhtml-parser-perl/t/uentities.t (original)
+++ trunk/libhtml-parser-perl/t/uentities.t Sun Oct 25 20:56:52 2009
@@ -2,7 +2,7 @@
use HTML::Entities;
-use Test::More tests => 27;
+use Test::More tests => 26;
SKIP: {
skip "This perl does not support Unicode or Unicode entities not selected",
@@ -25,15 +25,15 @@
is(decode_entities(""), "\x{FFFD}");
is(decode_entities(""), "\x{FFFD}");
is(decode_entities(""), "\x{FFFD}");
-is(decode_entities(""), "\x{FFFD}");
+is(decode_entities(""), "");
is(decode_entities(""), "\x{FFFD}");
-is(decode_entities("�"), chr(0xFFFD));
-is(decode_entities("�"), chr(0xFFFD));
+is(decode_entities("�"), "�");
+is(decode_entities("�"), "�");
-is(decode_entities("�"), "\0");
-is(decode_entities("�"), "\0");
-is(decode_entities("�"), "\0");
-is(decode_entities("�"), "\0");
+is(decode_entities("�"), "�");
+is(decode_entities("�"), "�");
+is(decode_entities("�"), "�");
+is(decode_entities("�"), "�");
is(decode_entities("&#ååå࿿"), "&#ååå\x{FFF}");
@@ -59,8 +59,6 @@
is(decode_entities("��"), chr(0x100085));
-is(decode_entities("��"), chr(0x100085));
-
is(decode_entities("�"), chr(0xFFFD));
is(decode_entities("\260’\260"), "\x{b0}\x{2019}\x{b0}");
Modified: trunk/libhtml-parser-perl/util.c
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-parser-perl/util.c?rev=46392&op=diff
==============================================================================
--- trunk/libhtml-parser-perl/util.c (original)
+++ trunk/libhtml-parser-perl/util.c Sun Oct 25 20:56:52 2009
@@ -1,5 +1,5 @@
/*
- * Copyright 1999-2006, Gisle Aas.
+ * Copyright 1999-2009, Gisle Aas.
*
* This library is free software; you can redistribute it and/or
* modify it under the same terms as Perl itself.
@@ -96,7 +96,6 @@
if (s < end && *s == '#') {
UV num = 0;
- UV prev = 0;
int ok = 0;
s++;
if (s < end && (*s == 'x' || *s == 'X')) {
@@ -106,12 +105,11 @@
if (!tmp)
break;
num = num << 4 | ((tmp - PL_hexdigit) & 15);
- if (prev && num <= prev) {
+ if (num > 0x10FFFF) {
/* overflow */
ok = 0;
break;
}
- prev = num;
s++;
ok = 1;
}
@@ -119,23 +117,25 @@
else {
while (s < end && isDIGIT(*s)) {
num = num * 10 + (*s - '0');
- if (prev && num < prev) {
+ if (num > 0x10FFFF) {
/* overflow */
ok = 0;
break;
}
- prev = num;
s++;
ok = 1;
}
}
- if (ok) {
+ if (num && ok) {
#ifdef UNICODE_HTML_PARSER
if (!SvUTF8(sv) && num <= 255) {
buf[0] = (char) num;
repl = buf;
repl_len = 1;
repl_utf8 = 0;
+ }
+ else if (num == 0xFFFE || num == 0xFFFF) {
+ /* illegal */
}
else {
char *tmp;
More information about the Pkg-perl-cvs-commits
mailing list