[libhtml-scrubber-perl] 06/11: Documentation tweaks and spelling list

Florian Schlichting fsfs at moszumanska.debian.org
Sat Nov 11 13:46:03 UTC 2017


This is an automated email from the git hooks/post-receive script.

fsfs pushed a commit to annotated tag release/0.09
in repository libhtml-scrubber-perl.

commit d420f9c9d32c965aeee01cd152e5bb9a0eeb0c4e
Author: Nigel Metheringham <nigelm at cpan.org>
Date:   Fri Apr 1 15:25:08 2011 +0100

    Documentation tweaks and spelling list
---
 README.pod           | 46 +++++++++++++++++++++-------------------------
 lib/HTML/Scrubber.pm | 44 ++++++++++++++++++++++----------------------
 2 files changed, 43 insertions(+), 47 deletions(-)

diff --git a/README.pod b/README.pod
index 2956679..a00ed97 100644
--- a/README.pod
+++ b/README.pod
@@ -1,3 +1,5 @@
+=for stopwords html
+
 =head1 NAME
 
 HTML::Scrubber - Perl extension for scrubbing/sanitizing html
@@ -8,23 +10,13 @@ version 0.09
 
 =head1 SYNOPSIS
 
-=head1 DESCRIPTION
-
-If you wanna "scrub" or "sanitize" html input
-in a reliable an flexible fashion,
-then this module is for you.
-
-I wasn't satisfied with HTML::Sanitizer because it is
-based on HTML::TreeBuilder,
-so I thought I'd write something similar
-that works directly with HTML::Parser.
+    use HTML::Scrubber;
 
-=for example begin
+    my $scrubber = HTML::Scrubber->new( allow => [ qw[ p b i u hr br ] ] );
+    print $scrubber->scrub('<p><b>bold</b> <em>missing</em></p>');
+    # output is: <p><b>bold</b> </p>
 
-    #!/usr/bin/perl -w
-    use HTML::Scrubber;
-    use strict;
-                                                                            #
+    # more complex input
     my $html = q[
     <style type="text/css"> BAD { background: #666; color: #666;} </style>
     <script language="javascript"> alert("Hello, I am EVIL!");    </script>
@@ -34,17 +26,21 @@ that works directly with HTML::Parser.
         b   => <B> bold </B>
         u   => <U> UNDERLINE </U>
     ];
-                                                                            #
-    my $scrubber = HTML::Scrubber->new( allow => [ qw[ p b i u hr br ] ] ); #
-                                                                            #
-    print $scrubber->scrub($html);                                          #
-                                                                            #
-    $scrubber->deny( qw[ p b i u hr br ] );                                 #
-                                                                            #
-    print $scrubber->scrub($html);                                          #
-                                                                            #
 
-=for example end
+    print $scrubber->scrub($html);
+
+    $scrubber->deny( qw[ p b i u hr br ] );
+
+    print $scrubber->scrub($html);
+
+=head1 DESCRIPTION
+
+If you wanna "scrub" or "sanitize" html input in a reliable and
+flexible fashion, then this module is for you.
+
+I wasn't satisfied with HTML::Sanitizer because it is based on
+HTML::TreeBuilder, so I thought I'd write something similar that
+works directly with HTML::Parser.
 
 =head1 METHODS
 
diff --git a/lib/HTML/Scrubber.pm b/lib/HTML/Scrubber.pm
index 4d289b9..17cdf63 100644
--- a/lib/HTML/Scrubber.pm
+++ b/lib/HTML/Scrubber.pm
@@ -4,14 +4,21 @@ package HTML::Scrubber;
 ## use critic
 # ABSTRACT: Perl extension for scrubbing/sanitizing html
 
-=head1 SYNOPSIS
+=begin :prelude
 
-=for example begin
+=for stopwords html
+
+=end :prelude
+
+=head1 SYNOPSIS
 
-    #!/usr/bin/perl -w
     use HTML::Scrubber;
-    use strict;
-                                                                            #
+
+    my $scrubber = HTML::Scrubber->new( allow => [ qw[ p b i u hr br ] ] );
+    print $scrubber->scrub('<p><b>bold</b> <em>missing</em></p>');
+    # output is: <p><b>bold</b> </p>
+
+    # more complex input
     my $html = q[
     <style type="text/css"> BAD { background: #666; color: #666;} </style>
     <script language="javascript"> alert("Hello, I am EVIL!");    </script>
@@ -21,29 +28,22 @@ package HTML::Scrubber;
         b   => <B> bold </B>
         u   => <U> UNDERLINE </U>
     ];
-                                                                            #
-    my $scrubber = HTML::Scrubber->new( allow => [ qw[ p b i u hr br ] ] ); #
-                                                                            #
-    print $scrubber->scrub($html);                                          #
-                                                                            #
-    $scrubber->deny( qw[ p b i u hr br ] );                                 #
-                                                                            #
-    print $scrubber->scrub($html);                                          #
-                                                                            #
 
+    print $scrubber->scrub($html);
+
+    $scrubber->deny( qw[ p b i u hr br ] );
+
+    print $scrubber->scrub($html);
 
-=for example end
 
 =head1 DESCRIPTION
 
-If you wanna "scrub" or "sanitize" html input
-in a reliable an flexible fashion,
-then this module is for you.
+If you wanna "scrub" or "sanitize" html input in a reliable and
+flexible fashion, then this module is for you.
 
-I wasn't satisfied with HTML::Sanitizer because it is
-based on HTML::TreeBuilder,
-so I thought I'd write something similar
-that works directly with HTML::Parser.
+I wasn't satisfied with HTML::Sanitizer because it is based on
+HTML::TreeBuilder, so I thought I'd write something similar that
+works directly with HTML::Parser.
 
 =head1 METHODS
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libhtml-scrubber-perl.git



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