summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2005-11-26 18:55:21 +0100
committerAndreas Gohr <andi@splitbrain.org>2005-11-26 18:55:21 +0100
commit1e6dfe497f883fb7c94874a81f2472f8134db0a5 (patch)
tree6fea6f472f84fc9fb21393bdbf72f90e10646587 /lib
parent31b47a2e76408b50c4dd23a05028a2f8af3f11aa (diff)
downloadrpg-1e6dfe497f883fb7c94874a81f2472f8134db0a5.tar.gz
rpg-1e6dfe497f883fb7c94874a81f2472f8134db0a5.tar.bz2
more fixes on spaces in spellcheck
darcs-hash:20051126175521-7ad00-b836b220bf1cf5f50d881e13d52494dc4c71902e.gz
Diffstat (limited to 'lib')
-rw-r--r--lib/exe/spellcheck.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/exe/spellcheck.php b/lib/exe/spellcheck.php
index 6d1a03910..fa84d11c0 100644
--- a/lib/exe/spellcheck.php
+++ b/lib/exe/spellcheck.php
@@ -122,8 +122,8 @@ function spell_check() {
$string = preg_replace('/\{\{(.*?)(\|(.*?))?(\}\})/e','spaceslink("\\1","\\2")',$string);
$string = preg_replace('/\[\[(.*?)(\|(.*?))?(\]\])/e','spaceslink("\\1","\\2")',$string);
- // run aspell in terse sgml mode
- if(!$spell->runAspell($string,$out,$err,array('!','+html'))){
+ // run aspell in terse sgml mode, ignore nbsp as correct word
+ if(!$spell->runAspell($string,$out,$err,array('!','+html','@nbsp'))){
print '2'; //to indicate an error
print "An error occured while trying to run the spellchecker:\n";
print $err;
@@ -243,12 +243,12 @@ function spell_resume(){
// remove HTML tags
$text = strip_tags($text);
- // restore quoted special chars
- $text = unhtmlspecialchars($text);
-
// restore spaces
$text = preg_replace('/&nbsp;/',' ',$text);
+ // restore quoted special chars
+ $text = unhtmlspecialchars($text);
+
// check if UTF-8 is accepted
if(!$_POST['utf8']){
// protect '&' (gets removed in JS later)