1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;
use Test::Fatal;
use HTML::Restrict;
my $html
= q[<!doctype html><!-- comments go here --><body onLoad="stuff">foo</body>];
like(
exception {
my $hr = HTML::Restrict->new( rules => { Body => ['onload'] } );
},
qr{tag names must be lower cased},
"dies on mixed case tag names",
);
like(
exception {
my $hr = HTML::Restrict->new( rules => { body => ['onLoad'] } );
},
qr{attribute names must be lower cased},
"dies on mixed case attributes",
);
done_testing();
|