diff --git a/app/Module/Base.php b/app/Module/Base.php index a685e9d1a..5191466fa 100755 --- a/app/Module/Base.php +++ b/app/Module/Base.php @@ -342,19 +342,15 @@ class Base { if (strtolower($charset) == 'utf-8') { if (Base::getStrlen($string) <= $length) return $string; - $strcut = str_replace(array('&', '"', '<', '>'), array('&', '"', '<', '>'), $string); - $strcut = Base::utf8Substr($strcut, $length, $start); - $strcut = str_replace(array('&', '"', '<', '>'), array('&', '"', '<', '>'), $strcut); + $strcut = Base::utf8Substr($string, $length, $start); return $strcut . $dot; } else { $length = $length * 2; if (strlen($string) <= $length) return $string; - $string = str_replace(array('&', '"', '<', '>'), array('&', '"', '<', '>'), $string); $strcut = ''; for ($i = 0; $i < $length; $i++) { $strcut .= ord($string[$i]) > 127 ? $string[$i] . $string[++$i] : $string[$i]; } - $strcut = str_replace(array('&', '"', '<', '>'), array('&', '"', '<', '>'), $strcut); } return $strcut . $dot; } diff --git a/resources/assets/js/components/TEditor.vue b/resources/assets/js/components/TEditor.vue index ea15756e2..95549f22d 100755 --- a/resources/assets/js/components/TEditor.vue +++ b/resources/assets/js/components/TEditor.vue @@ -2,7 +2,7 @@