mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-03 16:51:40 +09:00
Only add spaces in getContentText() before complete </p> and </div> tags, not </pre>
https://xetown.com/questions/1817630
This commit is contained in:
parent
1bb0123e59
commit
41f4eada9d
2 changed files with 2 additions and 2 deletions
|
|
@ -504,7 +504,7 @@ class CommentItem extends BaseObject
|
|||
$content = $this->get('content');
|
||||
}
|
||||
|
||||
$content = preg_replace('!(</p|</div|<br)!i', ' $1', $content);
|
||||
$content = preg_replace('!(</p>|</div>|<br)!i', ' $1', $content);
|
||||
$content = trim(utf8_normalize_spaces(html_entity_decode(strip_tags($content))));
|
||||
if($strlen)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -648,7 +648,7 @@ class DocumentItem extends BaseObject
|
|||
return lang('msg_is_secret');
|
||||
}
|
||||
|
||||
$content = preg_replace('!(</p|</div|<br)!i', ' $1', $this->get('content'));
|
||||
$content = preg_replace('!(</p>|</div>|<br)!i', ' $1', $this->get('content'));
|
||||
$content = preg_replace_callback('/<(object|param|embed)[^>]*/is', array($this, '_checkAllowScriptAccess'), $content);
|
||||
$content = preg_replace_callback('/<object[^>]*>/is', array($this, '_addAllowScriptAccess'), $content);
|
||||
if($strlen)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue