diff options
| author | Ivan Kohler <ivan@freeside.biz> | 2012-06-01 17:15:27 -0700 |
|---|---|---|
| committer | Ivan Kohler <ivan@freeside.biz> | 2012-06-01 17:15:27 -0700 |
| commit | cbb4c260c40779ba84c794dd68147c54f3de2f52 (patch) | |
| tree | 2be7909d11386d157240b48ac4ce5ff878adfa1f /rt/share/html/Elements/ScrubHTML | |
| parent | d4617c6565d5fc6bafe14d11c19646b0674ae73d (diff) | |
RT 3.8.13
Diffstat (limited to 'rt/share/html/Elements/ScrubHTML')
| -rw-r--r-- | rt/share/html/Elements/ScrubHTML | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/rt/share/html/Elements/ScrubHTML b/rt/share/html/Elements/ScrubHTML index 87aaaf387..5f72d24de 100644 --- a/rt/share/html/Elements/ScrubHTML +++ b/rt/share/html/Elements/ScrubHTML @@ -45,32 +45,8 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<%ONCE> -my $scrubber = new HTML::Scrubber; -$scrubber->default( - 0, - { - '*' => 0, - id => 1, - class => 1, - # Match http, ftp and relative urls - # XXX: we also scrub format strings with this module then allow simple config options - href => qr{^(?:http:|ftp:|https:|/|__Web(?:Path|BaseURL|URL)__)}i, - face => 1, - size => 1, - target => 1, - style => qr{^(?:(?:color:\s*rgb\(\d+,\s*\d+,\s*\d+\))| - (?:text-align:\s*))}ix, - } -); -$scrubber->deny(qw[*]); -$scrubber->allow( - qw[A B U P BR I HR BR SMALL EM FONT SPAN STRONG SUB SUP STRIKE H1 H2 H3 H4 H5 H6 DIV UL OL LI DL DT DD PRE] -); -$scrubber->comment(0); -</%ONCE> <%init> -return $scrubber->scrub($Content); +return ScrubHTML($Content); </%init> <%args> $Content => undef |
