Browse Source

Merge pull request #1182 from owncloud/sanitizeHTML-Clean

Expanded one line if statement - Trivial
tags/v5.0.0alpha1
Lukas Reschke 11 years ago
parent
commit
71ae41716a
1 changed files with 5 additions and 2 deletions
  1. 5
    2
      lib/util.php

+ 5
- 2
lib/util.php View File

@@ -467,8 +467,11 @@ class OC_Util {
* @return array with sanitized strings or a single sanitized string, depends on the input parameter.
*/
public static function sanitizeHTML( &$value ) {
if (is_array($value) || is_object($value)) array_walk_recursive($value, 'OC_Util::sanitizeHTML');
else $value = htmlentities($value, ENT_QUOTES, 'UTF-8'); //Specify encoding for PHP<5.4
if (is_array($value) || is_object($value)) {
array_walk_recursive($value, 'OC_Util::sanitizeHTML');
} else {
$value = htmlentities($value, ENT_QUOTES, 'UTF-8'); //Specify encoding for PHP<5.4
}
return $value;
}


Loading…
Cancel
Save