]> wagnertech.de Git - kivitendo-erp.git/blobdiff - SL/HTML/Util.pm
PriceSource: Spalte vor Preis und Rabatt anzeigen.
[kivitendo-erp.git] / SL / HTML / Util.pm
index 72a7a7f57481a3522833d04bfc45740d3fccc27a..c62fd9202e1c32927ebd32c5dc96e34aaca5161c 100644 (file)
@@ -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 );