Minahito
minah****@users*****
2005年 11月 27日 (日) 16:22:27 JST
Index: xoops2jp/html/class/XCube_ActionForm.class.php diff -u xoops2jp/html/class/XCube_ActionForm.class.php:1.1.2.10 xoops2jp/html/class/XCube_ActionForm.class.php:1.1.2.11 --- xoops2jp/html/class/XCube_ActionForm.class.php:1.1.2.10 Tue Nov 22 23:33:34 2005 +++ xoops2jp/html/class/XCube_ActionForm.class.php Sun Nov 27 16:22:27 2005 @@ -309,7 +309,7 @@ function fetch() { parent::fetch(); - if(preg_match_all("/[\\00-\\31]/",$this->mValue,$matches,PREG_PATTERN_ORDER)) { + if(preg_match_all("/[\\x00-\\x1f]/",$this->mValue,$matches,PREG_PATTERN_ORDER)) { foreach($matches[0] as $match) { die("Get control code :" . ord($match)); } @@ -325,10 +325,7 @@ $matches=array(); $allow_codes=array(9,10,13); - // - // TODO: Why? The following regex pattern finds 0x0D. - // - if(preg_match_all("/[\\00-\\08\\11-12\\14\\16-\\31]/",$this->mValue,$matches,PREG_PATTERN_ORDER)) { + if(preg_match_all("/[\\x00-\\x09]|[\\x0b-\\x0c]|[\\x0e-\\x1f]/",$this->mValue,$matches,PREG_PATTERN_ORDER)) { foreach($matches[0] as $match) { if(!in_array(ord($match),$allow_codes) && ord($match)<32) die("Get control code :" . ord($match));