X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FHTML%2FUtil.pm;h=c62fd9202e1c32927ebd32c5dc96e34aaca5161c;hb=f207efd1ad8835c046c2945c3d0d693626622521;hp=72a7a7f57481a3522833d04bfc45740d3fccc27a;hpb=e09fbb1194ebfbb3b278bae40d31c67e416cf919;p=kivitendo-erp.git diff --git a/SL/HTML/Util.pm b/SL/HTML/Util.pm index 72a7a7f57..c62fd9202 100644 --- a/SL/HTML/Util.pm +++ b/SL/HTML/Util.pm @@ -17,6 +17,11 @@ sub strip { my $value = !ref($class_or_value) && (($class_or_value // '') eq 'SL::HTML::Util') ? $_[1] : $class_or_value; + return '' unless defined $value; + + # Remove HTML comments. + $value =~ s{ }{}gx; + if (!%stripper) { %stripper = ( parser => HTML::Parser->new );