/** * 纯文本输入 * @param unknown $text * @return mixed */ function t($text) { $text = tsDecode($text); $text = @preg_replace('/\\[.*?\\]/is', '', $text); $text = cleanJs($text); // 彻底过滤空格BY QINIAO $text = @preg_replace('/\\s(?=\\s)/', '', $text); $text = @preg_replace('/[\\n\\r\\t]/', ' ', $text); $text = str_replace(' ', ' ', $text); // $text = str_replace ( ' ', '', $text ); $text = str_replace(' ', '', $text); $text = str_replace('&', '', $text); $text = str_replace('=', '', $text); $text = str_replace('-', '', $text); $text = str_replace('#', '', $text); $text = str_replace('%', '', $text); $text = str_replace('!', '', $text); $text = str_replace('@', '', $text); $text = str_replace('^', '', $text); $text = str_replace('*', '', $text); $text = str_replace('amp;', '', $text); $text = str_replace('position', '', $text); $text = strip_tags($text); $text = htmlspecialchars($text); $text = str_replace("'", "", $text); return $text; }
function h($text) { $text = cleanJs($text); return $text; }