mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 09:41:40 +09:00
change getSummary method remove HTML comment
This commit is contained in:
parent
38b3fd2ce5
commit
4e42a59253
1 changed files with 5 additions and 5 deletions
|
|
@ -523,19 +523,19 @@ class documentItem extends Object
|
|||
|
||||
function getSummary($str_size = 50, $tail = '...')
|
||||
{
|
||||
$content = $this->getContent(false,false);
|
||||
$content = $this->getContent(FALSE, FALSE);
|
||||
|
||||
// For a newlink, inert a whitespace
|
||||
$content = preg_replace('!(<br[\s]*/{0,1}>[\s]*)+!is', ' ', $content);
|
||||
|
||||
// Replace tags such as </p> , </div> , </li> and others to a whitespace
|
||||
$content = str_replace(array('</p>', '</div>', '</li>'), ' ', $content);
|
||||
$content = str_replace(array('</p>', '</div>', '</li>', '-->'), ' ', $content);
|
||||
|
||||
// Remove Tags
|
||||
$content = preg_replace('!<([^>]*?)>!is','', $content);
|
||||
$content = preg_replace('!<([^>]*?)>!is', '', $content);
|
||||
|
||||
// Replace < , >, "
|
||||
$content = str_replace(array('<','>','"',' '), array('<','>','"',' '), $content);
|
||||
$content = str_replace(array('<', '>', '"', ' '), array('<', '>', '"', ' '), $content);
|
||||
|
||||
// Delete a series of whitespaces
|
||||
$content = preg_replace('/ ( +)/is', ' ', $content);
|
||||
|
|
@ -544,7 +544,7 @@ class documentItem extends Object
|
|||
$content = trim(cut_str($content, $str_size, $tail));
|
||||
|
||||
// Replace back < , <, "
|
||||
$content = str_replace(array('<','>','"'),array('<','>','"'), $content);
|
||||
$content = str_replace(array('<', '>', '"'),array('<', '>', '"'), $content);
|
||||
|
||||
return $content;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue