diff --git a/petitnote/functions.php b/petitnote/functions.php index 197311a8..39f2cc78 100644 --- a/petitnote/functions.php +++ b/petitnote/functions.php @@ -343,21 +343,30 @@ function get_uip(){ //タブ除去 function t($str){ - if($str!==0 && $str!=='0' && !$str){ + if($str===0 || $str==='0'){ + return '0'; + } + if(!$str){ return ''; } return str_replace("\t","",$str); } //タグ除去 function s($str){ - if($str!==0 && $str!=='0' && !$str){ + if($str===0 || $str==='0'){ + return '0'; + } + if(!$str){ return ''; } return strip_tags($str); } //エスケープ function h($str){ - if($str!==0 && $str!=='0' && !$str){ + if($str===0 || $str==='0'){ + return '0'; + } + if(!$str){ return ''; } return htmlspecialchars($str,ENT_QUOTES,"utf-8",false); diff --git a/petitnote/index.php b/petitnote/index.php index 2d85efc9..c0a7f03c 100644 --- a/petitnote/index.php +++ b/petitnote/index.php @@ -1,7 +1,7 @@