diff options
author | andi <andi@splitbrain.org> | 2005-06-09 20:37:09 +0200 |
---|---|---|
committer | andi <andi@splitbrain.org> | 2005-06-09 20:37:09 +0200 |
commit | e1b80655c063a49d8762da43baee81198a5da1ff (patch) | |
tree | de48d780a81d1d3462841e310ecc6557407fbe99 /lib | |
parent | a898c721e634fd07b5fff0fd3b0e5b1295236d8a (diff) | |
download | rpg-e1b80655c063a49d8762da43baee81198a5da1ff.tar.gz rpg-e1b80655c063a49d8762da43baee81198a5da1ff.tar.bz2 |
spellchecker fix for eating whitespaces
darcs-hash:20050609183709-9977f-daf9d77db759dc3dab0f62df8aee9ca33bfa52e5.gz
Diffstat (limited to 'lib')
-rw-r--r-- | lib/exe/spellcheck.php | 3 | ||||
-rw-r--r-- | lib/scripts/tw-sack.js | 2 |
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) {} } |