불필요한 부분 제거

This commit is contained in:
conory 2017-05-23 10:30:38 +09:00
parent eb339c8101
commit 35eae12cca
4 changed files with 5 additions and 18 deletions

View file

@ -422,11 +422,8 @@ class commentItem extends Object
// Convert temporarily html entity for truncate
$content = html_entity_decode($content, ENT_QUOTES);
// Replace unicode whitespace characters (no-break space)
$content = utf8_normalize_spaces($content);
// Replace all whitespaces to single space
$content = trim(preg_replace('/\s+/', ' ', $content));
$content = utf8_trim(utf8_normalize_spaces($content));
// Truncate string
$content = cut_str($content, $str_size, $tail);

View file

@ -639,11 +639,8 @@ class documentItem extends Object
// Convert temporarily html entity for truncate
$content = html_entity_decode($content, ENT_QUOTES);
// Replace unicode whitespace characters (no-break space)
$content = utf8_normalize_spaces($content);
// Replace all whitespaces to single space
$content = trim(preg_replace('/\s+/', ' ', $content));
$content = utf8_trim(utf8_normalize_spaces($content));
// Truncate string
$content = cut_str($content, $str_size, $tail);

View file

@ -453,11 +453,8 @@ class content extends WidgetHandler
// Convert temporarily html entity for truncate
$content = html_entity_decode($content, ENT_QUOTES);
// Replace unicode whitespace characters (no-break space)
$content = utf8_normalize_spaces($content);
// Replace all whitespaces to single space
$content = trim(preg_replace('/\s+/', ' ', $content));
$content = utf8_trim(utf8_normalize_spaces($content));
// Truncate string
$content = cut_str($content, $str_size, '...');

View file

@ -385,19 +385,15 @@ class mcontent extends WidgetHandler
// Convert temporarily html entity for truncate
$content = html_entity_decode($content, ENT_QUOTES);
// Replace unicode whitespace characters (no-break space)
$content = utf8_normalize_spaces($content);
// Replace all whitespaces to single space
$content = trim(preg_replace('/\s+/', ' ', $content));
$content = utf8_trim(utf8_normalize_spaces($content));
// Truncate string
$content = cut_str($content, $str_size, '...');
return escape($content);
}
/**
* @brief function to receive contents from rss url
* For Tistory blog in Korea, the original RSS url has location header without contents. Fixed to work as same as rss_reader widget.