diff options
-rw-r--r-- | lib/exe/spellcheck.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/exe/spellcheck.php b/lib/exe/spellcheck.php index 4bb08fd88..6d1a03910 100644 --- a/lib/exe/spellcheck.php +++ b/lib/exe/spellcheck.php @@ -112,6 +112,9 @@ function spell_check() { $string = preg_replace("/(\015\012)|(\015)/","\012",$string); $string = htmlspecialchars($string); + // make sure multiple spaces are kept + $string = preg_replace('/ /',' ',$string); + // we need the text as array later $data = explode("\n",$string); @@ -243,6 +246,9 @@ function spell_resume(){ // restore quoted special chars $text = unhtmlspecialchars($text); + // restore spaces + $text = preg_replace('/ /',' ',$text); + // check if UTF-8 is accepted if(!$_POST['utf8']){ // protect '&' (gets removed in JS later) |