protected function _verifyText(&$text) { $text = Tinhte_XenTag_Helper::getNormalizedTagText($text); $censored = XenForo_Helper_String::censorString($text); if ($censored !== $text) { $this->error(new XenForo_Phrase('tinhte_xentag_tag_no_contain_censored'), 'tag_text'); return false; } if (Tinhte_XenTag_Helper::isTagContainingSeparator($text)) { $this->error(new XenForo_Phrase('tinhte_xentag_tag_can_not_contain_comma'), 'tag_text'); return false; } $textLength = utf8_strlen($text); if ($textLength < Tinhte_XenTag_Option::get('tagMinLength')) { $this->error(new XenForo_Phrase('tinhte_xentag_tag_must_be_at_least_x_length', array('minLength' => Tinhte_XenTag_Option::get('tagMinLength'))), 'tag_text'); return false; } if ($textLength > Tinhte_XenTag_Option::get('tagMaxLength')) { $this->error(new XenForo_Phrase('tinhte_xentag_tag_can_not_longer_than_x', array('maxLength' => Tinhte_XenTag_Option::get('tagMaxLength'))), 'tag_text'); return false; } return true; }