Browse Source

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

Tobias Reich 9 years ago
parent
commit
0387581005
2 changed files with 2 additions and 2 deletions
  1. 1 1
      php/modules/Album.php
  2. 1 1
      php/modules/Photo.php

+ 1 - 1
php/modules/Album.php

@@ -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

+ 1 - 1
php/modules/Photo.php

@@ -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