From c845e756930a43aa0be8b07f3d398c2c1d8f36e8 Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Mon, 14 Jan 2013 22:01:52 +0100 Subject: [PATCH] Expand if to multiple lines Oneliners are ugly. --- lib/util.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/util.php b/lib/util.php index a8576fc105..225e70d765 100755 --- a/lib/util.php +++ b/lib/util.php @@ -467,8 +467,12 @@ 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; }