commit perl-HTML-Parser for openSUSE:Factory
Hello community,
here is the log from the commit of package perl-HTML-Parser for openSUSE:Factory
checked in at Fri Feb 27 16:15:19 CET 2009.
--------
--- perl-HTML-Parser/perl-HTML-Parser.changes 2009-01-20 16:43:09.000000000 +0100
+++ /mounts/work_src_done/STABLE/perl-HTML-Parser/perl-HTML-Parser.changes 2009-02-27 11:14:10.000000000 +0100
@@ -1,0 +2,13 @@
+Fri Feb 27 10:48:05 CET 2009 - anicka@suse.cz
+
+- update to 3.60
+ * Spelling fixes.
+ * Test multi-value headers.
+ * Documentation improvements.
+ * Do not terminate head parsing on the <object> element
+ * Add support for HTML 5 <meta charset> and new HEAD elements.
+ * Short description of the htextsub example
+ * Suppress warning when encode_entities is called with undef
+ * HTML::Parser doesn't compile with perl 5.8.0.
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
HTML-Parser-3.59.tar.bz2
New:
----
HTML-Parser-3.60.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-HTML-Parser.spec ++++++
--- /var/tmp/diff_new_pack.o27775/_old 2009-02-27 16:15:10.000000000 +0100
+++ /var/tmp/diff_new_pack.o27775/_new 2009-02-27 16:15:10.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package perl-HTML-Parser (Version 3.59)
+# spec file for package perl-HTML-Parser (Version 3.60)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -20,7 +20,7 @@
Name: perl-HTML-Parser
BuildRequires: perl-HTML-Tagset
-Version: 3.59
+Version: 3.60
Release: 1
Provides: perl_htp
Obsoletes: perl_htp
@@ -70,6 +70,16 @@
/var/adm/perl-modules/%{name}
%changelog
+* Fri Feb 27 2009 anicka@suse.cz
+- update to 3.60
+ * Spelling fixes.
+ * Test multi-value headers.
+ * Documentation improvements.
+ * Do not terminate head parsing on the <object> element
+ * Add support for HTML 5 <meta charset> and new HEAD elements.
+ * Short description of the htextsub example
+ * Suppress warning when encode_entities is called with undef
+ * HTML::Parser doesn't compile with perl 5.8.0.
* Tue Jan 20 2009 anicka@suse.cz
- update to 3.59
* Restore perl-5.6 compatibility for HTML::HeadParser.
++++++ HTML-Parser-3.59.tar.bz2 -> HTML-Parser-3.60.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/HTML-Parser-3.59/Changes new/HTML-Parser-3.60/Changes
--- old/HTML-Parser-3.59/Changes 2008-11-24 10:06:21.000000000 +0100
+++ new/HTML-Parser-3.60/Changes 2009-02-09 12:17:15.000000000 +0100
@@ -1,3 +1,25 @@
+_______________________________________________________________________________
+2009-02-09 Release 3.60
+
+Ville Skytta (5):
+ Spelling fixes.
+ Test multi-value headers.
+ Documentation improvements.
+ Do not terminate head parsing on the <object> element (added in HTML 4.0).
+ Add support for HTML 5 <meta charset> and new HEAD elements.
+
+Damyan Ivanov (1):
+ Short description of the htextsub example
+
+Mike South (1):
+ Suppress warning when encode_entities is called with undef [RT#27567]
+
+Zefram (1):
+ HTML::Parser doesn't compile with perl 5.8.0.
+
+
+
+_______________________________________________________________________________
2008-11-24 Gisle Aas , but possibly between <p> and </p>
+
use strict;
my $code = shift || usage();
$code = 'sub edit_print { local $_ = shift; ' . $code . '; print }';
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/HTML-Parser-3.59/lib/HTML/Entities.pm new/HTML-Parser-3.60/lib/HTML/Entities.pm
--- old/HTML-Parser-3.59/lib/HTML/Entities.pm 2008-11-17 12:25:53.000000000 +0100
+++ new/HTML-Parser-3.60/lib/HTML/Entities.pm 2009-02-09 12:19:02.000000000 +0100
@@ -57,7 +57,7 @@
single character strings. If a key has ";" as suffix,
then occurrences in $string are only expanded if properly terminated
with ";". Entities without ";" will be expanded regardless of how
-they are terminated for compatiblity with how common browsers treat
+they are terminated for compatibility with how common browsers treat
entities in the Latin-1 range.
If $expand_prefix is TRUE then entities without trailing ";" in
@@ -139,7 +139,7 @@
@EXPORT = qw(encode_entities decode_entities _decode_entities);
@EXPORT_OK = qw(%entity2char %char2entity encode_entities_numeric);
-$VERSION = "3.57";
+$VERSION = "3.60";
sub Version { $VERSION; }
require HTML::Parser; # for fast XS implemented decode_entities
@@ -446,6 +446,7 @@
sub encode_entities
{
+ return undef unless defined $_[0];
my $ref;
if (defined wantarray) {
my $x = $_[0];
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/HTML-Parser-3.59/lib/HTML/HeadParser.pm new/HTML-Parser-3.60/lib/HTML/HeadParser.pm
--- old/HTML-Parser-3.59/lib/HTML/HeadParser.pm 2008-11-24 10:04:29.000000000 +0100
+++ new/HTML-Parser-3.60/lib/HTML/HeadParser.pm 2009-02-09 12:19:17.000000000 +0100
@@ -13,6 +13,8 @@
$p->header('Title') # to access <title>....</title>
$p->header('Content-Base') # to access <base href="http://...">
$p->header('Foo') # to access <meta http-equiv="Foo" content="...">
+ $p->header('X-Meta-Author') # to access <meta name="author" content="...">
+ $p->header('X-Meta-Charset') # to access <meta charset="...">
=head1 DESCRIPTION
@@ -52,9 +54,18 @@
=item X-Meta-Foo:
-All E<lt>meta> elements will initialize headers with the prefix
-"C<X-Meta->" on the name. If the E<lt>meta> element contains a
-C<http-equiv> attribute, then it will be honored as the header name.
+All E<lt>meta> elements containing a C<name> attribute will result in
+headers using the prefix C<X-Meta-> appended with the value of the
+C<name> attribute as the name of the header, and the value of the
+C<content> attribute as the pushed header value.
+
+E<lt>meta> elements containing a C<http-equiv> attribute will result
+in headers as in above, but without the C<X-Meta-> prefix in the
+header name.
+
+E<lt>meta> elements containing a C<charset> attribute will result in
+an C<X-Meta-Charset> header, using the value of the C<charset>
+attribute as the pushed header value.
=back
@@ -76,7 +87,7 @@
use strict;
use vars qw($VERSION $DEBUG);
#$DEBUG = 1;
-$VERSION = "3.59";
+$VERSION = "3.60";
=item $hp = HTML::HeadParser->new
@@ -85,7 +96,7 @@
The object constructor. The optional $header argument should be a
reference to an object that implement the header() and push_header()
methods as defined by the CHTTP::Headers class. Normally it will be
-of some class that isa or delegates to the CHTTP::Headers class.
+of some class that is a or delegates to the CHTTP::Headers class.
If no $header is given CHTML::HeadParser will create an
CHTTP::Header object by itself (initially empty).
@@ -157,7 +168,14 @@
# SCRIPT* & META* & LINK*">
#
# <!ELEMENT HEAD O O (%head.content)>
-
+#
+# From HTML 4.01:
+#
+# <!ENTITY % head.misc "SCRIPT|STYLE|META|LINK|OBJECT">
+# <!ENTITY % head.content "TITLE & BASE?">
+# <!ELEMENT HEAD O O (%head.content;) +(%head.misc;)>
+#
+# Added in HTML 5: noscript, eventsource, command
sub start
{
@@ -167,8 +185,15 @@
if ($tag eq 'meta') {
my $key = $attr->{'http-equiv'};
if (!defined($key) || !length($key)) {
- return unless $attr->{'name'};
- $key = "X-Meta-\u$attr->{'name'}";
+ if ($attr->{name}) {
+ $key = "X-Meta-\u$attr->{name}";
+ } elsif ($attr->{charset}) { # HTML 5 <meta charset="...">
+ $key = "X-Meta-Charset";
+ $self->{header}->push_header($key => $attr->{charset});
+ return;
+ } else {
+ return;
+ }
}
$self->{'header'}->push_header($key => $attr->{content});
} elsif ($tag eq 'base') {
@@ -178,7 +203,8 @@
# This is a non-standard header. Perhaps we should just ignore
# this element
$self->{'header'}->push_header(Isindex => $attr->{prompt} || '?');
- } elsif ($tag =~ /^(?:title|script|style)$/) {
+ } elsif ($tag =~ /^(?:title|(?:no)?script|style|object
+ |eventsource|command)$/x) {
# Just remember tag. Initialize header when we see the end tag.
$self->{'tag'} = $tag;
} elsif ($tag eq 'link') {
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/HTML-Parser-3.59/lib/HTML/LinkExtor.pm new/HTML-Parser-3.60/lib/HTML/LinkExtor.pm
--- old/HTML-Parser-3.59/lib/HTML/LinkExtor.pm 2008-04-04 10:44:54.000000000 +0200
+++ new/HTML-Parser-3.60/lib/HTML/LinkExtor.pm 2009-02-09 12:20:17.000000000 +0100
@@ -2,7 +2,7 @@
require HTML::Parser;
@ISA = qw(HTML::Parser);
-$VERSION = "3.57";
+$VERSION = "3.60";
=head1 NAME
@@ -104,7 +104,7 @@
=item $p->links
Returns a list of all links found in the document. The returned
-values will be anonymous arrays with the follwing elements:
+values will be anonymous arrays with the following elements:
[$tag, $attr => $url1, $attr2 => $url2,...]
@@ -155,7 +155,7 @@
}
# Make the parser. Unfortunately, we don't know the base yet
- # (it might be diffent from $url)
+ # (it might be different from $url)
$p = HTML::LinkExtor->new(\&callback);
# Request document and parse it as it arrives
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/HTML-Parser-3.59/META.yml new/HTML-Parser-3.60/META.yml
--- old/HTML-Parser-3.59/META.yml 2008-11-24 10:12:16.000000000 +0100
+++ new/HTML-Parser-3.60/META.yml 2009-02-09 12:22:16.000000000 +0100
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: HTML-Parser
-version: 3.59
+version: 3.60
abstract: HTML parser class
author:
- Gisle Aas
participants (1)
-
root@Hilbert.suse.de