projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Wiederkehrende Rechnungen: Variable period_end_date gefixt
[kivitendo-erp.git]
/
SL
/
HTML
/
Util.pm
diff --git
a/SL/HTML/Util.pm
b/SL/HTML/Util.pm
index
72a7a7f
..
c62fd92
100644
(file)
--- 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;
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 );
if (!%stripper) {
%stripper = ( parser => HTML::Parser->new );