Merge pull request #193 from SoneYours/develop

security
This commit is contained in:
BJRambo 2016-02-03 05:54:48 +09:00
commit 637a5268e7

View file

@ -610,6 +610,7 @@ class documentController extends document
$obj->homepage = $source_obj->get('homepage');
}
// If the tile is empty, extract string from the contents.
$obj->title = htmlspecialchars($obj->title);
settype($obj->title, "string");
if($obj->title == '') $obj->title = cut_str(strip_tags($obj->content),20,'...');
// If no tile extracted from the contents, leave it untitled.