Avoid space removal when pasting text from word processor.

Since bf380eea50, some spaces were removed when pasting text from a word processor (at least using Libre Office). To avoid double space creations and space removal, we only remove line break which are tight to a space character.
pull/2739/head
Olivier Tétard 2015-07-27 16:38:57 +02:00
parent 5c531eebc5
commit 275a7d31e0
1 changed files with 1 additions and 1 deletions

View File

@ -100,7 +100,7 @@ function makeContentCollector(collectStyles, abrowser, apool, domInterface, clas
function textify(str)
{
return sanitizeUnicode(
str.replace(/\n/g, '').replace(/[\n\r ]/g, ' ').replace(/\xa0/g, ' ').replace(/\t/g, ' '));
str.replace(/(\n | \n)/g, ' ').replace(/[\n\r ]/g, ' ').replace(/\xa0/g, ' ').replace(/\t/g, ' '));
}
function getAssoc(node, name)