Aion-Format

 view release on metacpan or  search on metacpan

lib/Aion/Format/Html.pm  view on Meta::CPAN

1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
        thead           => _set(qw/table/),
        tbody           => _set(qw/table/),
        tfoot           => _set(qw/table/),
        tr                      => _set(qw/table thead tbody tfoot caption/),
        td                      => _set(qw/table thead tbody tfoot caption/),
        th                      => _set(qw/table thead tbody tfoot caption/),
        dt                      => _set(qw/dl/),
        dd                      => _set(qw/dl/),
        rt                      => _set(qw/ruby/),
        rp                      => _set(qw/ruby/),
        option          => _set(qw/optgroup select/),
        optgroup        => _set(qw/select/),
);
 
# <tr> закрывает открытые <td> и <th> и <tr>
our %TOP_NEW_TAG = (
        head            => _set(qw/body/),
        tr                      => _set(qw/tr thead tbody tfoot/),
        td                      => _set(qw/tr thead tbody tfoot td th/),
        th                      => _set(qw/tr thead tbody tfoot td th/),
        col                     => _set(qw/tr thead tbody tfoot td th colgroup/),
        colgroup        => _set(qw/thead tbody tfoot caption colgroup/),

lib/Aion/Format/Html.pm  view on Meta::CPAN

1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
                | (?<nbsp> \xa0)
        }{$to->()}genisx;
 
        $_
}
 
# Все, кроме запрещённых:
#  applet, script, style, embed, object, param,
#  video, audio, source, track, frame, frameset, iframe, comment
#  html, head, body, title, meta, base, basefont, bgsound, link
#  form, keygen, output, textarea, select, option, optgroup, legend, label, input
#  plaintext, xmp
# А так же удаляет атрибуты начинающиеся на "on", name, for, formaction и др..
my %SAFE_TAG = map {$_=>1} qw/
a
abbr
acronym
address
 
area
article



( run in 0.384 second using v1.01-cache-2.11-cpan-9b1e4054eb1 )