tags as part of mismatched tag tracking
- Replace magic constants of 0, 1 and 2 in HTML::Defang with exported constants DEFANG_NONE, DEFANG_ALWAYS and DEFANG_DEFAULT
- allow attribute values upto 16384 chars long
1.03 Mon Jun 14 16:22:35 2010
- fix incorrect tag closing when "/" appears as attribute key
- handle deep span nests with the same attrs, not just no attrs
- we might not find the tag if we hit one that stops further breaking out, that's not an error to report
- track noscript mismatched tags
- more nested table tags fixes
- unicode fixes on attribute/style entity expansions
- more deep nested span/div hacks
- avoid undef error
- optimisation for nested inline tags within block tags
- massive speedup on deeply nested tags
- defang tweaks on large sets of style rules
- use /\G..../gc matching on style rather than s///
- close/re-open inline tags across block tags
- only convert \u sequences in stripped values
- track mismatched tags, and defang -- in a tag as well
- need to strip -- in defanged tags because --'s in comments are bad
1.02 Mon Aug 24 18:00:00 2009
- add col and colgroup as possible ImplicitOpenTags
- change to prevent double-defang by default. Add option to allow it.
- open a new
, not a
if we need to open an implicit tag
- add tbody back into list of implicit table tags
- include & ... ; when encoding entity in new attributes
- don't insert implicit open tag if it's the tag we actually just parsed
- avoid excessive backtracking on some style tags. cleanup unquoting code
- track tt blocks as well
- add more tags to track
- more quoting fixes
- expand html entities in styles as well
- don't unescape % sequences in URLs, just in stripped test value
- in attributes, % sequences are only every 2 chars
1.01 Tue Apr 27 11:35:44 2009
- first public release
0.01 Tue Feb 24 17:50:13 2009
- original version; created by h2xs 1.23 with options
-XAn HTML::Defang
HTML-Defang-1.04/t/ 0000755 0000000 0000000 00000000000 11510340034 012314 5 ustar root root HTML-Defang-1.04/t/05_callbacks.t 0000644 0000000 0000000 00000150432 11510337762 014747 0 ustar root root #!/usr/bin/perl -w
BEGIN { do '/home/mod_perl/hm/ME/FindLibs.pm'; }
use Test::More tests => 94;
use HTML::Defang;
use strict;
my ($Res, $H);
my ($DefangString, $CommentStartText, $CommentEndText) = ('defang_', '', '');
#################################
# Basic tag callback tests
#################################
my $Defang = HTML::Defang->new(
tags_to_callback => [ qw(img font unknown1 unknown2 button hr area) ],
tags_callback => sub {
my ($Context, $Defang, $Angle, $Tag, $IsEndTag, $AttributeHash, $HtmlR) = @_;
my $DefangFlag = 2;
$DefangFlag = 0 if $Tag eq "img" || $Tag eq "unknown1" || $Tag eq "button";
$DefangFlag = 1 if $Tag eq "font" || $Tag eq "unknown2" || $Tag eq "hr";
return $DefangFlag;
}
);
$H = <
2:
3:
4:
5:
6:
7:
8:
9: