function ewiki_page_edit_preview_spellcheck($data) { $html .= ewiki_page_edit_preview($data); ewiki_spellcheck_init($GLOBALS["ewiki_spellcheck_language"]); $regex = '(<.+?>|&\\w;)|([\\w' . EWIKI_CHARS_L . EWIKI_CHARS_U . ']{2,256})'; preg_match_all("/{$regex}/", $html, $words); $words = $words[2]; $replacements = ewiki_spellcheck_list($words); $html = preg_replace("/{$regex}/e", ' "$1" . ( empty($replacements["$2"]) ? "$2" : $replacements["$2"] ) ', $html); return $html; }
function ewiki_page_edit_preview_spellcheck($data) { $html .= ewiki_page_edit_preview($data); ewiki_spellcheck_init($GLOBALS["ewiki_spellcheck_language"]); $regex = '(<.+?>)|([\\w]{2,256})'; //Word characters only to prevent shell relevent characters preg_match_all("/" . $regex . "/", $html, $words); $words = $words[2]; $replacements = ewiki_spellcheck_list($words); $html = preg_replace("/{$regex}/e", ' ( empty($replacements["$2"]) ? "$1$2" : "$1".$replacements["$2"] ) ', $html); return $html; }
function ewiki_page_edit_preview_spellcheck($data) { $html .= ewiki_page_edit_preview($data); return ewiki_do_spellcheck($html); }