Merge branch 'b-3.6.1' of ../kivitendo-erp_20220811
[kivitendo-erp.git] / SL / Template / LaTeX.pm
index b2b6838..293db2e 100644 (file)
@@ -83,6 +83,8 @@ sub _format_html {
   $content =~ s{ (?:\ |\s)+ }{ }gx;
   $content =~ s{ (?:\ |\s)+$ }{}gx;
   $content =~ s{ (?: <br/?> )+$ }{}gx;
+  $content =~ s{ <ul>\s*</ul> | <ol>\s*</ol> }{}igx;
+  $content =~ s{ (?: <p>\s*</p>\s* )+ \Z }{}imgx;
 
   my @parts = grep { $_ } map {
     if (substr($_, 0, 1) eq '<') {
@@ -394,8 +396,8 @@ sub _embed_file_directive {
   my ($self, $file) = @_;
 
   # { source      => $xmlfile,
-  #   name        => 'ZUGFeRD-invoice.xml',
-  #   description => $::locale->text('ZUGFeRD invoice'), }
+  #   name        => 'factur-x.xml',
+  #   description => $::locale->text('Factur-X/ZUGFeRD invoice'), }
 
   my $file_name  =  blessed($file->{source}) && $file->{source}->can('filename') ? $file->{source}->filename : "" . $file->{source}->filename;
   my $embed_name =  $file->{name} // $file_name;