mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
f4db8adddb 보완
This commit is contained in:
parent
f4db8adddb
commit
385ce7107a
1 changed files with 8 additions and 8 deletions
|
|
@ -636,17 +636,17 @@ class documentItem extends Object
|
|||
// Remove tags
|
||||
$content = strip_tags($this->getContent(false, false));
|
||||
|
||||
// Remove html entity of No-break space
|
||||
$content = str_replace(' ', ' ', $content);
|
||||
|
||||
// Remove whitespaces and No-break space character
|
||||
$content = trim(preg_replace('/\s+|[\\pZ\\pC]+/u', ' ', $content));
|
||||
|
||||
// Convert temporarily html entity for truncate
|
||||
$content = htmlspecialchars_decode($content, ENT_QUOTES);
|
||||
$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));
|
||||
|
||||
// Truncate string
|
||||
$content = trim(cut_str($content, $str_size, $tail));
|
||||
$content = cut_str($content, $str_size, $tail);
|
||||
|
||||
return escape($content, false);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue