Esempio n. 1
0
 /**
  * Sanitize input parameter to avoid code injection
  *   - remove html tags
  * 
  * @param {String or Array} $strOrArray
  */
 public static function sanitize($strOrArray)
 {
     if (!isset($strOrArray)) {
         return null;
     }
     if (is_array($strOrArray)) {
         $result = array();
         foreach ($strOrArray as $key => $value) {
             $result[$key] = RestoUtil::sanitizeString($value);
         }
         return $result;
     }
     return RestoUtil::sanitizeString($strOrArray);
 }