예제 #1
0
파일: Html.php 프로젝트: AllenLyu/ko
 public static function S2Text($sIn, $iMaxLength = 0, $sExt = '')
 {
     $sIn = strip_tags($sIn);
     $sIn = str_replace(' ', ' ', $sIn);
     $sIn = htmlspecialchars_decode($sIn);
     $sIn = Ko_Html_Utils::SDeleteUselessBlank($sIn);
     if ($iMaxLength) {
         $sIn = Ko_Tool_Str::SSubStr_UTF8($sIn, $iMaxLength, $sExt);
     }
     return $sIn;
 }
예제 #2
0
파일: Text.php 프로젝트: AllenLyu/ko
 public static function S2Html($sIn, $iMaxLength = 0)
 {
     if ($iMaxLength) {
         $sIn = Ko_Tool_Str::SSubStr_UTF8($sIn, $iMaxLength);
     }
     $sIn = Ko_View_Escape::VEscapeHtml($sIn);
     if ($iMaxLength) {
         $sIn = Ko_Html_WebParse::sParse($sIn, $iMaxLength, 'UTF-8');
     }
     return $sIn;
 }
예제 #3
0
파일: Api.php 프로젝트: firaga/operation
 private function _aGetTags($tags)
 {
     if ('回收站' === $tags) {
         return array('回收站');
     }
     $tags = explode(' ', $tags);
     $tags[] = '全部';
     $tags = array_values(array_diff(array_unique($tags), array('', '未分类', '回收站')));
     if (1 === count($tags)) {
         $tags[] = '未分类';
     }
     foreach ($tags as &$tag) {
         $tag = Ko_Tool_Str::SSubStr_UTF8($tag, 60);
     }
     unset($tag);
     return $tags;
 }