summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/exe/spellcheck.php3
-rw-r--r--lib/scripts/tw-sack.js2
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/exe/spellcheck.php b/lib/exe/spellcheck.php
index bdd6789d4..df4f134f4 100644
--- a/lib/exe/spellcheck.php
+++ b/lib/exe/spellcheck.php
@@ -164,7 +164,8 @@ function spell_formatword($word,$suggestions=null){
function spell_resume(){
$text = $_POST['data'];
- $text = preg_replace("/(\r\n|\n|\r)/", "", $text);
+ //some browsers insert newlines instead of spaces
+ $text = preg_replace("/(\r\n|\n|\r)/", ' ', $text);
$text = preg_replace("=<br */?>=i", "\n", $text);
// remove HTML tags
diff --git a/lib/scripts/tw-sack.js b/lib/scripts/tw-sack.js
index f9b8f247f..1480ca41c 100644
--- a/lib/scripts/tw-sack.js
+++ b/lib/scripts/tw-sack.js
@@ -90,7 +90,7 @@ function sack(file){
}
if (this.method == "POST"){
try {
- this.xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded')
+ this.xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
} catch (e) {}
}