Expand if to multiple lines
Oneliners are ugly.
This commit is contained in:
parent
53ca0db434
commit
c845e75693
1 changed files with 6 additions and 2 deletions
|
@ -467,8 +467,12 @@ class OC_Util {
|
||||||
* @return array with sanitized strings or a single sanitized string, depends on the input parameter.
|
* @return array with sanitized strings or a single sanitized string, depends on the input parameter.
|
||||||
*/
|
*/
|
||||||
public static function sanitizeHTML( &$value ) {
|
public static function sanitizeHTML( &$value ) {
|
||||||
if (is_array($value) || is_object($value)) array_walk_recursive($value, 'OC_Util::sanitizeHTML');
|
if (is_array($value) || is_object($value))
|
||||||
else $value = htmlentities($value, ENT_QUOTES, 'UTF-8'); //Specify encoding for PHP<5.4
|
{
|
||||||
|
array_walk_recursive($value, 'OC_Util::sanitizeHTML');
|
||||||
|
} else {
|
||||||
|
$value = htmlentities($value, ENT_QUOTES, 'UTF-8'); //Specify encoding for PHP<5.4
|
||||||
|
}
|
||||||
return $value;
|
return $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue