mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-03 16:51:40 +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
|
|
@ -67,7 +67,7 @@
|
|||
<li class="delicious link"><a href="https://delicious.com/">Delicious</a></li>
|
||||
</ul>
|
||||
<script>
|
||||
var sTitle = '{str_ireplace(array('<script', '</script'), array("<scr'+'ipt", "</scr'+'ipt"), addslashes($oDocument->getTitleText()))}';
|
||||
var sTitle = {json_encode($oDocument->getTitleText())};
|
||||
jQuery(function($){
|
||||
$('.twitter>a').snspost({
|
||||
type : 'twitter',
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@
|
|||
</li>
|
||||
</ul>
|
||||
<script>
|
||||
var sTitle = '{$oDocument->getTitleText()}';
|
||||
var sTitle = {json_encode($oDocument->getTitleText())};
|
||||
jQuery(function($){
|
||||
$('.twitter').snspost({
|
||||
type : 'twitter',
|
||||
|
|
|
|||
|
|
@ -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