X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FElements%2FScrubHTML;h=e6a34b94692e53c42b67e389c3dc1e47bc712ff5;hb=14a5274c8b8cd2700d7141c8c15903bac881d46c;hp=87aaaf38741302889aecc3d924fec2690c67ada0;hpb=0fb307c305e4bc2c9c27dc25a3308beae3a4d33c;p=freeside.git diff --git a/rt/share/html/Elements/ScrubHTML b/rt/share/html/Elements/ScrubHTML index 87aaaf387..e6a34b946 100644 --- a/rt/share/html/Elements/ScrubHTML +++ b/rt/share/html/Elements/ScrubHTML @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -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); - <%init> -return $scrubber->scrub($Content); +return ScrubHTML($Content); <%args> $Content => undef