mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Potential fix for #1004
This commit is contained in:
parent
49f76ffe76
commit
321782aa26
1 changed files with 6 additions and 11 deletions
15
vendors/squire/build/squire-raw.js
vendored
15
vendors/squire/build/squire-raw.js
vendored
|
|
@ -3471,20 +3471,15 @@ class Squire
|
|||
}
|
||||
let lines = plainText.split(/\r?\n/),
|
||||
closeBlock = '</' + blockTag + '>',
|
||||
openBlock = '<' + blockTag + '>',
|
||||
i = lines.length,
|
||||
line;
|
||||
openBlock = '<' + blockTag + '>';
|
||||
|
||||
while (i--) {
|
||||
line = escapeHTML(lines[i]).replace(/ (?=)/g, ' ');
|
||||
lines.forEach((line, i) => {
|
||||
line = escapeHTML(line).replace(/ (?=(?: |$))/g, NBSP);
|
||||
// We don't wrap the first line in the block, so if it gets inserted
|
||||
// into a blank line it keeps that line's formatting.
|
||||
// Wrap each line in <div></div>
|
||||
if (i) {
|
||||
line = openBlock + (line || '<BR>') + closeBlock;
|
||||
}
|
||||
lines[i] = line;
|
||||
}
|
||||
lines[i] = i ? openBlock + (line || '<BR>') + closeBlock : line;
|
||||
});
|
||||
return this.insertHTML(lines.join(''), isPaste);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue