r16692 - in /trunk/libhtml-clean-perl: debian/ debian/patches/ lib/HTML/
dmn at users.alioth.debian.org
dmn at users.alioth.debian.org
Fri Mar 7 08:55:14 UTC 2008
Author: dmn
Date: Fri Mar 7 08:55:13 2008
New Revision: 16692
URL: http://svn.debian.org/wsvn/?sc=1&rev=16692
Log:
* split source modifications to:
+ no-use-IO_271346.patch
+ javascript-comments_303619.patch
+ no-blank-at-start_255631.patch
+ clean-and-pre_282503.patch
+ pod-before-head.patch
* revert unneeded escaping if double quotes within regular expressions
Added:
trunk/libhtml-clean-perl/debian/patches/
trunk/libhtml-clean-perl/debian/patches/clean-and-pre_282503.patch
trunk/libhtml-clean-perl/debian/patches/javascript-comments_303619.patch
trunk/libhtml-clean-perl/debian/patches/no-blank-at-start_255631.patch
trunk/libhtml-clean-perl/debian/patches/no-use-IO_271346.patch
trunk/libhtml-clean-perl/debian/patches/pod-before-head.patch
trunk/libhtml-clean-perl/debian/patches/series
Modified:
trunk/libhtml-clean-perl/debian/changelog
trunk/libhtml-clean-perl/lib/HTML/Clean.pm
Modified: trunk/libhtml-clean-perl/debian/changelog
URL: http://svn.debian.org/wsvn/trunk/libhtml-clean-perl/debian/changelog?rev=16692&op=diff
==============================================================================
--- trunk/libhtml-clean-perl/debian/changelog (original)
+++ trunk/libhtml-clean-perl/debian/changelog Fri Mar 7 08:55:13 2008
@@ -12,6 +12,13 @@
* debian/rules: clean up
+ stop ignoring distclean errors
+ replace PREFIX by DESTDIR
+ * split source modifications to:
+ + no-use-IO_271346.patch
+ + javascript-comments_303619.patch
+ + no-blank-at-start_255631.patch
+ + clean-and-pre_282503.patch
+ + pod-before-head.patch
+ * revert unneeded escaping if double quotes within regular expressions
-- gregor herrmann <gregor+debian at comodo.priv.at> Tue, 09 Oct 2007 22:29:40 +0200
Added: trunk/libhtml-clean-perl/debian/patches/clean-and-pre_282503.patch
URL: http://svn.debian.org/wsvn/trunk/libhtml-clean-perl/debian/patches/clean-and-pre_282503.patch?rev=16692&op=file
==============================================================================
--- trunk/libhtml-clean-perl/debian/patches/clean-and-pre_282503.patch (added)
+++ trunk/libhtml-clean-perl/debian/patches/clean-and-pre_282503.patch Fri Mar 7 08:55:13 2008
@@ -1,0 +1,39 @@
+Index: libhtml-clean-perl/lib/HTML/Clean.pm
+===================================================================
+--- libhtml-clean-perl.orig/lib/HTML/Clean.pm 2008-03-07 10:48:37.000000000 +0200
++++ libhtml-clean-perl/lib/HTML/Clean.pm 2008-03-07 10:52:18.000000000 +0200
+@@ -366,6 +366,16 @@
+
+ =back
+
++Please note that if your HTML includes preformatted regions (this means, if
++it includes <pre>...</pre>, we do not suggest removing whitespace, as it will
++alter the rendered defaults.
++
++HTML::Clean will print out a warning if it finds a preformatted region and is
++requested to strip whitespace. In order to prevent this, specify that you don't
++want to strip whitespace - i.e.
++
++ $h->strip( {whitespace => 0} );
++
+ =cut
+
+ use vars qw/
+@@ -426,6 +436,17 @@
+ }
+
+ if ($do_whitespace) {
++ if ($$h =~ /<pre/i) {
++ warn << 'EOF'
++Warning: Stripping whitespace will affect preformatted region\'s layout
++You have a <pre> region in your HTML, which depends on the whitespace not
++being modified. You requested to strip the whitespace - The rendered results
++will be affected.
++
++Hint: Use $h->strip({whitespace => 0}); instead.
++EOF
++ }
++
+ $$h =~ s,[\r\n]+,\n,sg; # Carriage/LF -> LF
+ $$h =~ s,\s+\n,\n,sg; # empty line
+ $$h =~ s,\n\s+<,\n<,sg; # space before tag
Added: trunk/libhtml-clean-perl/debian/patches/javascript-comments_303619.patch
URL: http://svn.debian.org/wsvn/trunk/libhtml-clean-perl/debian/patches/javascript-comments_303619.patch?rev=16692&op=file
==============================================================================
--- trunk/libhtml-clean-perl/debian/patches/javascript-comments_303619.patch (added)
+++ trunk/libhtml-clean-perl/debian/patches/javascript-comments_303619.patch Fri Mar 7 08:55:13 2008
@@ -1,0 +1,17 @@
+Index: libhtml-clean-perl/lib/HTML/Clean.pm
+===================================================================
+--- libhtml-clean-perl.orig/lib/HTML/Clean.pm 2008-03-07 10:33:57.000000000 +0200
++++ libhtml-clean-perl/lib/HTML/Clean.pm 2008-03-07 10:37:00.000000000 +0200
+@@ -213,9 +213,10 @@
+ $js =~ s,\s+//.*?\n,\n,sig;
+
+ # insure javascript is hidden
+-
+ if ($js =~ m,<!--,) {
+- $js =~ s,</script>,// -->\n</script>,si;
++ unless ($js =~ m,(-->[\s\r\n]*</script>),i) {
++ $js =~ s,</script>,// -->\n</script>,si;
++ }
+ }
+ return($js);
+ }
Added: trunk/libhtml-clean-perl/debian/patches/no-blank-at-start_255631.patch
URL: http://svn.debian.org/wsvn/trunk/libhtml-clean-perl/debian/patches/no-blank-at-start_255631.patch?rev=16692&op=file
==============================================================================
--- trunk/libhtml-clean-perl/debian/patches/no-blank-at-start_255631.patch (added)
+++ trunk/libhtml-clean-perl/debian/patches/no-blank-at-start_255631.patch Fri Mar 7 08:55:13 2008
@@ -1,0 +1,13 @@
+Index: libhtml-clean-perl/lib/HTML/Clean.pm
+===================================================================
+--- libhtml-clean-perl.orig/lib/HTML/Clean.pm 2008-03-07 10:46:49.000000000 +0200
++++ libhtml-clean-perl/lib/HTML/Clean.pm 2008-03-07 10:48:37.000000000 +0200
+@@ -429,7 +429,7 @@
+ $$h =~ s,[\r\n]+,\n,sg; # Carriage/LF -> LF
+ $$h =~ s,\s+\n,\n,sg; # empty line
+ $$h =~ s,\n\s+<,\n<,sg; # space before tag
+- $$h =~ s,\n\s+,\n ,sg; # other spaces
++ $$h =~ s,\n\s+,\n,sg; # other spaces
+
+ $$h =~ s,>\n\s*<,><,sg; # LF/spaces between tags..
+
Added: trunk/libhtml-clean-perl/debian/patches/no-use-IO_271346.patch
URL: http://svn.debian.org/wsvn/trunk/libhtml-clean-perl/debian/patches/no-use-IO_271346.patch?rev=16692&op=file
==============================================================================
--- trunk/libhtml-clean-perl/debian/patches/no-use-IO_271346.patch (added)
+++ trunk/libhtml-clean-perl/debian/patches/no-use-IO_271346.patch Fri Mar 7 08:55:13 2008
@@ -1,0 +1,10 @@
+--- libhtml-clean-perl-0.8.orig/lib/HTML/Clean.pm
++++ libhtml-clean-perl-0.8/lib/HTML/Clean.pm
+@@ -1,7 +1,6 @@
+ package HTML::Clean;
+
+ use Carp;
+-use IO;
+ use Fcntl;
+ use strict;
+ require 5.004;
Added: trunk/libhtml-clean-perl/debian/patches/pod-before-head.patch
URL: http://svn.debian.org/wsvn/trunk/libhtml-clean-perl/debian/patches/pod-before-head.patch?rev=16692&op=file
==============================================================================
--- trunk/libhtml-clean-perl/debian/patches/pod-before-head.patch (added)
+++ trunk/libhtml-clean-perl/debian/patches/pod-before-head.patch Fri Mar 7 08:55:13 2008
@@ -1,0 +1,76 @@
+Index: libhtml-clean-perl/lib/HTML/Clean.pm
+===================================================================
+--- libhtml-clean-perl.orig/lib/HTML/Clean.pm 2008-03-07 10:37:46.000000000 +0200
++++ libhtml-clean-perl/lib/HTML/Clean.pm 2008-03-07 10:40:02.000000000 +0200
+@@ -63,6 +63,8 @@
+
+ ######################################################################
+
++=pod
++
+ =head2 $h = new HTML::Clean($dataorfile, [$level]);
+
+ This creates a new HTML::Clean object. A Prerequisite for all other
+@@ -106,6 +108,8 @@
+ # Set up the data in the self hash..
+ #
+
++=pod
++
+ =head2 $h->initialize($dataorfile)
+
+ This function allows you to reinitialize the HTML data used by the
+@@ -151,6 +155,7 @@
+ return(0); # file not found?
+ }
+
++=pod
+
+ =head2 $h->level([$level])
+
+@@ -167,6 +172,8 @@
+ return($self->{'LEVEL'});
+ }
+
++=pod
++
+ =head2 $myref = $h->data()
+
+ Returns the current HTML data as a scalar reference.
+@@ -330,6 +337,8 @@
+ 'yuml' => 255
+ );
+
++=pod
++
+ =head2 strip(\%options);
+
+ Removes excess space from HTML
+@@ -606,6 +615,8 @@
+
+ ######################################################################
+
++=pod
++
+ =head2 compat()
+
+ This function improves the cross-platform compatibility of your HTML.
+@@ -650,6 +661,8 @@
+ return($tag);
+ }
+
++=pod
++
+ =head2 defrontpage();
+
+ This function converts pages created with Microsoft Frontpage to
+@@ -677,7 +690,8 @@
+ }
+ $$h =~ s,<!--(mstheme|msthemeseparator|msnavigation)-->,,sgx;
+ }
+-=back
++
++=pod
+
+ =head1 SEE ALSO
+
Added: trunk/libhtml-clean-perl/debian/patches/series
URL: http://svn.debian.org/wsvn/trunk/libhtml-clean-perl/debian/patches/series?rev=16692&op=file
==============================================================================
--- trunk/libhtml-clean-perl/debian/patches/series (added)
+++ trunk/libhtml-clean-perl/debian/patches/series Fri Mar 7 08:55:13 2008
@@ -1,0 +1,5 @@
+no-use-IO_271346.patch
+javascript-comments_303619.patch
+no-blank-at-start_255631.patch
+clean-and-pre_282503.patch
+pod-before-head.patch
Modified: trunk/libhtml-clean-perl/lib/HTML/Clean.pm
URL: http://svn.debian.org/wsvn/trunk/libhtml-clean-perl/lib/HTML/Clean.pm?rev=16692&op=diff
==============================================================================
--- trunk/libhtml-clean-perl/lib/HTML/Clean.pm (original)
+++ trunk/libhtml-clean-perl/lib/HTML/Clean.pm Fri Mar 7 08:55:13 2008
@@ -1,6 +1,7 @@
package HTML::Clean;
use Carp;
+use IO;
use Fcntl;
use strict;
require 5.004;
@@ -63,8 +64,6 @@
######################################################################
-=pod
-
=head2 $h = new HTML::Clean($dataorfile, [$level]);
This creates a new HTML::Clean object. A Prerequisite for all other
@@ -108,8 +107,6 @@
# Set up the data in the self hash..
#
-=pod
-
=head2 $h->initialize($dataorfile)
This function allows you to reinitialize the HTML data used by the
@@ -155,7 +152,6 @@
return(0); # file not found?
}
-=pod
=head2 $h->level([$level])
@@ -171,8 +167,6 @@
}
return($self->{'LEVEL'});
}
-
-=pod
=head2 $myref = $h->data()
@@ -220,10 +214,9 @@
$js =~ s,\s+//.*?\n,\n,sig;
# insure javascript is hidden
+
if ($js =~ m,<!--,) {
- unless ($js =~ m,(-->[\s\r\n]*</script>),i) {
- $js =~ s,</script>,// -->\n</script>,si;
- }
+ $js =~ s,</script>,// -->\n</script>,si;
}
return($js);
}
@@ -337,8 +330,6 @@
'yuml' => 255
);
-=pod
-
=head2 strip(\%options);
Removes excess space from HTML
@@ -374,16 +365,6 @@
The default is 'b i font center'
=back
-
-Please note that if your HTML includes preformatted regions (this means, if
-it includes <pre>...</pre>, we do not suggest removing whitespace, as it will
-alter the rendered defaults.
-
-HTML::Clean will print out a warning if it finds a preformatted region and is
-requested to strip whitespace. In order to prevent this, specify that you don't
-want to strip whitespace - i.e.
-
- $h->strip( {whitespace => 0} );
=cut
@@ -445,21 +426,10 @@
}
if ($do_whitespace) {
- if ($$h =~ /<pre/i) {
- warn << 'EOF'
-Warning: Stripping whitespace will affect preformatted region\'s layout
-You have a <pre> region in your HTML, which depends on the whitespace not
-being modified. You requested to strip the whitespace - The rendered results
-will be affected.
-
-Hint: Use $h->strip({whitespace => 0}); instead.
-EOF
- }
-
$$h =~ s,[\r\n]+,\n,sg; # Carriage/LF -> LF
$$h =~ s,\s+\n,\n,sg; # empty line
$$h =~ s,\n\s+<,\n<,sg; # space before tag
- $$h =~ s,\n\s+,\n,sg; # other spaces
+ $$h =~ s,\n\s+,\n ,sg; # other spaces
$$h =~ s,>\n\s*<,><,sg; # LF/spaces between tags..
@@ -514,7 +484,7 @@
}
if ($do_dequote) {
- while ($$h =~ s,<([A-z]+ [A-z]+=)([\'\"])([A-z0-9]+)\2(\s*?[^>]*?>),<$1$3$4,sig)
+ while ($$h =~ s,<([A-z]+ [A-z]+=)(['"])([A-z0-9]+)\2(\s*?[^>]*?>),<$1$3$4,sig)
{
# Remove alphanumeric quotes. Note, breaks DTD..
;
@@ -615,8 +585,6 @@
######################################################################
-=pod
-
=head2 compat()
This function improves the cross-platform compatibility of your HTML.
@@ -661,8 +629,6 @@
return($tag);
}
-=pod
-
=head2 defrontpage();
This function converts pages created with Microsoft Frontpage to
@@ -685,13 +651,12 @@
my $h = $self->{'DATA'};
- while ($$h =~ s,<img\sSRC=\"[\./]*_vti_bin/fpcount.exe(/.*/).Page=(.*?)\|.*?\s(.*?)>,<img src=\"/counter?link=$1$2\" $3>,xis) {
+ while ($$h =~ s,<img\sSRC="[\./]*_vti_bin/fpcount.exe(/.*/).Page=(.*?)\|.*?\s(.*?)>,<img src="/counter?link=$1$2" $3>,xis) {
print "Converted a Hitcounter.. $1, $2, $3\n";
}
$$h =~ s,<!--(mstheme|msthemeseparator|msnavigation)-->,,sgx;
}
-
-=pod
+=back
=head1 SEE ALSO
More information about the Pkg-perl-cvs-commits
mailing list