Merge branch 'g5'

This commit is contained in:
chicpro
2015-07-14 13:59:26 +09:00
10 changed files with 23 additions and 15 deletions

View File

@ -192,7 +192,7 @@ function confirm($msg, $url1='', $url2='', $url3='')
alert($msg);
}
if (!$url3) $url3 = $_SERVER['HTTP_REFERER'];
if (!$url3) $url3 = clean_xss_tags($_SERVER['HTTP_REFERER']);
$msg = str_replace("\\n", "<br>", $msg);
@ -2738,6 +2738,11 @@ function clean_xss_tags($str)
{
$str = preg_replace('#</*(?:applet|b(?:ase|gsound|link)|embed|frame(?:set)?|i(?:frame|layer)|l(?:ayer|ink)|meta|object|s(?:cript|tyle)|title|xml)[^>]*+>#i', '', $str);
$search = array('"', "'");
$replace = array('&#34;', '&#39;');
$str = str_replace($search, $replace, $str);
return $str;
}