Fixed a problem with htmlentities and older PHP versions (#212)

This commit is contained in:
Tobias Reich 2014-08-26 10:15:17 +02:00
parent 5c530ff255
commit 0387581005
2 changed files with 2 additions and 2 deletions

View File

@ -402,7 +402,7 @@ class Album extends Module {
$this->plugins(__METHOD__, 0, func_get_args());
# Parse
$description = htmlentities($description);
$description = htmlentities($description, ENT_COMPAT | ENT_HTML401, 'UTF-8');
if (strlen($description)>1000) $description = substr($description, 0, 1000);
# Execute query

View File

@ -656,7 +656,7 @@ class Photo extends Module {
$this->plugins(__METHOD__, 0, func_get_args());
# Parse
$description = htmlentities($description);
$description = htmlentities($description, ENT_COMPAT | ENT_HTML401, 'UTF-8');
if (strlen($description)>1000) $description = substr($description, 0, 1000);
# Set description