From a4c42bfb2337d37da89d789cb8cc226367994e32 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 21 May 2012 00:15:27 +0000 Subject: perl 5.14.2 from siep git-svn-id: svn://tug.org/texlive/trunk@26525 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/tlperl/lib/HTML/HeadParser.pm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'Master/tlpkg/tlperl/lib/HTML/HeadParser.pm') diff --git a/Master/tlpkg/tlperl/lib/HTML/HeadParser.pm b/Master/tlpkg/tlperl/lib/HTML/HeadParser.pm index af3da842aed..fe6916ec494 100644 --- a/Master/tlpkg/tlperl/lib/HTML/HeadParser.pm +++ b/Master/tlpkg/tlperl/lib/HTML/HeadParser.pm @@ -87,7 +87,7 @@ use HTML::Entities (); use strict; use vars qw($VERSION $DEBUG); #$DEBUG = 1; -$VERSION = "3.66"; +$VERSION = "3.69"; =item $hp = HTML::HeadParser->new @@ -207,7 +207,8 @@ sub start $self->{'header'}->push_header($key => $attr->{content}); } elsif ($tag eq 'base') { return unless exists $attr->{href}; - $self->{'header'}->push_header('Content-Base' => $attr->{href}); + (my $base = $attr->{href}) =~ s/^\s+//; $base =~ s/\s+$//; # HTML5 + $self->{'header'}->push_header('Content-Base' => $base); } elsif ($tag eq 'isindex') { # This is a non-standard header. Perhaps we should just ignore # this element @@ -218,7 +219,9 @@ sub start } elsif ($tag eq 'link') { return unless exists $attr->{href}; # - my $h_val = "<" . delete($attr->{href}) . ">"; + my $href = delete($attr->{href}); + $href =~ s/^\s+//; $href =~ s/\s+$//; # HTML5 + my $h_val = "<$href>"; for (sort keys %{$attr}) { next if $_ eq "/"; # XHTML junk $h_val .= qq(; $_="$attr->{$_}"); @@ -265,7 +268,7 @@ sub text } BEGIN { - *utf8_mode = sub { 1 } unless HTML::Entities::UNICODE_SUPPORT;; + *utf8_mode = sub { 1 } unless HTML::Entities::UNICODE_SUPPORT; } 1; -- cgit v1.2.3