mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 18:21:39 +09:00
Merge branch 'security/rve-2024-1' into develop
This commit is contained in:
commit
9eea71631a
4 changed files with 11 additions and 10 deletions
|
|
@ -748,11 +748,11 @@ class DocumentController extends Document
|
|||
|
||||
// If the tile is empty, extract string from the contents.
|
||||
$obj->title = escape($obj->title, false);
|
||||
if($obj->title == '')
|
||||
if ($obj->title === '')
|
||||
{
|
||||
$obj->title = cut_str(trim(strip_tags(nl2br($obj->content))),20,'...');
|
||||
$obj->title = escape(cut_str(trim(utf8_normalize_spaces(strip_tags($obj->content))), 20, '...'), false);
|
||||
}
|
||||
if($obj->title == '')
|
||||
if ($obj->title === '')
|
||||
{
|
||||
$obj->title = 'Untitled';
|
||||
}
|
||||
|
|
@ -1047,11 +1047,11 @@ class DocumentController extends Document
|
|||
|
||||
// If the tile is empty, extract string from the contents.
|
||||
$obj->title = escape($obj->title, false);
|
||||
if($obj->title == '')
|
||||
if ($obj->title === '')
|
||||
{
|
||||
$obj->title = cut_str(strip_tags($obj->content),20,'...');
|
||||
$obj->title = escape(cut_str(trim(utf8_normalize_spaces(strip_tags($obj->content))), 20, '...'), false);
|
||||
}
|
||||
if($obj->title == '')
|
||||
if ($obj->title === '')
|
||||
{
|
||||
$obj->title = 'Untitled';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -495,7 +495,8 @@ class DocumentItem extends BaseObject
|
|||
return;
|
||||
}
|
||||
|
||||
return $cut_size ? cut_str($this->get('title'), $cut_size, $tail) : $this->get('title');
|
||||
$title = $cut_size ? cut_str($this->get('title'), $cut_size, $tail) : $this->get('title');
|
||||
return escape($title, false);
|
||||
}
|
||||
|
||||
function getVoted()
|
||||
|
|
@ -593,7 +594,7 @@ class DocumentItem extends BaseObject
|
|||
return false;
|
||||
}
|
||||
|
||||
$title = escape($this->getTitleText($cut_size, $tail), false);
|
||||
$title = $this->getTitleText($cut_size, $tail);
|
||||
$this->add('title_color', trim($this->get('title_color') ?? ''));
|
||||
|
||||
$attrs = array();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue