projects
/
kivitendo-erp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
50e99be
)
HTML zu LaTeX: gewisse kaputte Konstrukte vom CKEditor entfernen
author
Moritz Bunkus
<m.bunkus@linet.de>
Tue, 23 Feb 2021 11:16:58 +0000
(12:16 +0100)
committer
Moritz Bunkus
<m.bunkus@linet.de>
Tue, 23 Feb 2021 11:16:58 +0000
(12:16 +0100)
Dazu gehören leere Listen <ul></ul> oder Paragraphen mit
Zeilenumbrüchen und non-breakable spaces <p><br><br> </p>
SL/Template/LaTeX.pm
patch
|
blob
|
history
diff --git
a/SL/Template/LaTeX.pm
b/SL/Template/LaTeX.pm
index
bc03eb3
..
293db2e
100644
(file)
--- a/
SL/Template/LaTeX.pm
+++ b/
SL/Template/LaTeX.pm
@@
-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 '<') {