sintonia/airtime_mvc/application/common/SecurityHelper.php

15 lines
378 B
PHP
Raw Normal View History

2015-06-12 19:11:28 +02:00
<?php
class SecurityHelper {
2015-06-12 19:48:54 +02:00
public static function htmlescape_recursive(&$arr) {
foreach ($arr as $key => $val) {
if (is_array($val)) {
self::htmlescape_recursive($arr[$key]);
} else if (is_string($val)) {
$arr[$key] = htmlspecialchars($val, ENT_QUOTES);
}
}
return $arr;
}
2015-06-12 19:11:28 +02:00
}