--- wp-includes/js/tinymce/plugins/spellchecker/classes/GoogleSpell.php.old	2008-08-20 08:20:22.000000000 +0200
+++ wp-includes/js/tinymce/plugins/spellchecker/classes/GoogleSpell.php	2010-11-27 00:15:54.000000000 +0100
@@ -105,9 +105,17 @@
 		return $matches;
 	}
 
+	function _unhtmlentities_cb1($matches) {
+		return chr(hexdec($matches[1]));
+	}
+
+	function _unhtmlentities_cb2($matches) {
+		return chr($matches[1]);
+	}
+
 	function _unhtmlentities($string) {
-		$string = preg_replace('~&#x([0-9a-f]+);~ei', 'chr(hexdec("\\1"))', $string);
-		$string = preg_replace('~&#([0-9]+);~e', 'chr(\\1)', $string);
+		$string = preg_replace_callback('~&#x([0-9a-f]+);~i', array(get_class($this), '_unhtmlentities_cb1'), $string);
+		$string = preg_replace_callback('~&#([0-9]+);~', array(get_class($this), '_unhtmlentities_cb2'), $string);
 
 		$trans_tbl = get_html_translation_table(HTML_ENTITIES);
 		$trans_tbl = array_flip($trans_tbl);
@@ -156,4 +164,4 @@
 	}
 }
 
-?>
\ No newline at end of file
+?>
