Skip to content

Commit

Permalink
Run author ship tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicholas Peter Bamber committed Oct 4, 2010
1 parent 6bbe560 commit aef9780
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 9 deletions.
45 changes: 45 additions & 0 deletions MANIFEST
@@ -1,6 +1,7 @@
Build.PL
Changes
ignore.txt
lib/Data/FormValidator/Filters/HTML/Acid.pm
lib/HTML/Acid.pm
lib/HTML/Acid/Buffer.pm
Makefile.PL
Expand All @@ -10,6 +11,9 @@ README
t/00.load.t
t/01.progression.t
t/02.buffer.t
t/03_variant.t
t/04.dfv.t
t/05.dfv-variant.t
t/changes.t
t/in/00-identical
t/in/01-unclosed-image
Expand All @@ -21,6 +25,7 @@ t/in/05-1-bad-image
t/in/05-2-bad-image
t/in/05-3-bad-image
t/in/05-4-bad-image
t/in/06-img-endtag
t/in/10-missing-p
t/in/11-extra-end-tag
t/in/12-no-doc-end
Expand All @@ -41,6 +46,9 @@ t/in/34-external-href
t/in/35-almost-empty-anchor
t/in/36-missing-anchor-title
t/in/37-empty-header
t/in/38-dodgy-alt
t/in/40-variant
t/lib/variant.pm
t/manifest.t
t/out/00-identical
t/out/01-unclosed-image
Expand All @@ -52,6 +60,7 @@ t/out/05-1-bad-image
t/out/05-2-bad-image
t/out/05-3-bad-image
t/out/05-4-bad-image
t/out/06-img-endtag
t/out/10-header-id
t/out/10-missing-p
t/out/11-extra-end-tag
Expand All @@ -73,8 +82,44 @@ t/out/34-external-href
t/out/35-almost-empty-anchor
t/out/36-missing-anchor-title
t/out/37-empty-header
t/out/38-dodgy-alt
t/out/40-variant
t/perlcritic.t
t/pod-coverage.t
t/pod.t
t/podspell.t
t/prereq.t
t/variant/00-identical
t/variant/01-unclosed-image
t/variant/02-text-inside-image
t/variant/03-end-attributes
t/variant/04-spans
t/variant/05-0-bad-image
t/variant/05-1-bad-image
t/variant/05-2-bad-image
t/variant/05-3-bad-image
t/variant/05-4-bad-image
t/variant/06-img-endtag
t/variant/10-header-id
t/variant/10-missing-p
t/variant/11-extra-end-tag
t/variant/12-no-doc-end
t/variant/13-misplaced-start
t/variant/14-strong-at-start
t/variant/20-br-drop
t/variant/21-br-break
t/variant/22-br-space
t/variant/23-br-strong
t/variant/24-br-header
t/variant/25-br-text
t/variant/26-br-enddoc
t/variant/30-emptypara
t/variant/31-header-no-id
t/variant/32-external-img
t/variant/33-empty-anchor
t/variant/34-external-href
t/variant/35-almost-empty-anchor
t/variant/36-missing-anchor-title
t/variant/37-empty-header
t/variant/38-dodgy-alt
t/variant/40-variant
9 changes: 5 additions & 4 deletions lib/Data/FormValidator/Filters/HTML/Acid.pm
@@ -1,11 +1,12 @@
package Data::FormValidator::Filters::HTML::Acid;
use base qw(Exporter);

@EXPORT = qw(filter_html);

use warnings;
use strict;
use Carp;
use vars qw(@EXPORT);

@EXPORT = qw(filter_html);

use HTML::Acid;

use version; our $VERSION = qv('0.0.1');
Expand All @@ -26,7 +27,7 @@ __END__
=head1 NAME
Data::FormValidator::Filters::HTML::Acid - HTML::Acid in DFV framework
Data::FormValidator::Filters::HTML::Acid - HTML::Acid in a popular data cleansing framework
=head1 VERSION
Expand Down
11 changes: 6 additions & 5 deletions lib/HTML/Acid.pm
Expand Up @@ -401,8 +401,9 @@ URL. They may also have a C<title> attribute.
=item * Images must have C<src>, C<title>, C<alt>, C<height> and C<width>
attributes. The C<src> attribute must match the same regular expression
as C<href>. If any of these tags are missing the image is replaced by
the contents of the alt attribute, so long as it consists only of alphanumeric
characters, spaces, full stops and commas. Otherwise the image is removed.
the contents of the C<alt> attribute, so long as it consists only of
alphanumeric characters, spaces, full stops and commas. Otherwise the image
is removed.
=item * All other tags must have no attributes and may only contain text.
Expand Down Expand Up @@ -467,18 +468,18 @@ This module works by subclassing L<HTML::Parser>.
None reported.
=head1 TODO
=head1 TO DO
=over
=item * More relaxed treatment of the alt tag would be good. However it is
=item * More relaxed treatment of the C<alt> tag would be good. However it is
easier to go from restrictive behaviour to more relaxed so it will stay like
it is for now.
=item * Sooner or later a little more flexibility in handling attributes
will be required.
=item * I think this module could do with an XS backend for a speed up.
=item * I think this module could do with an XS back-end for a speed up.
=back
Expand Down
2 changes: 2 additions & 0 deletions t/podspell.t
Expand Up @@ -22,10 +22,12 @@ Test::Spelling::add_stopwords(qw( AnnoCPAN
detaint
github
HTML
URL
inline
javascript
RT
XHTML
XS
XSS));
Test::Spelling::all_pod_files_spelling_ok();

0 comments on commit aef9780

Please sign in to comment.