Minahito
minah****@users*****
2007年 2月 19日 (月) 15:54:44 JST
Index: xoops2jp/html/install/class/textsanitizer.php diff -u xoops2jp/html/install/class/textsanitizer.php:1.2.20.2 xoops2jp/html/install/class/textsanitizer.php:1.2.20.2.2.1 --- xoops2jp/html/install/class/textsanitizer.php:1.2.20.2 Wed Oct 25 19:03:57 2006 +++ xoops2jp/html/install/class/textsanitizer.php Mon Feb 19 15:54:44 2007 @@ -1,5 +1,5 @@ <?php -// $Id: textsanitizer.php,v 1.2.20.2 2006/10/25 10:03:57 minahito Exp $ +// $Id: textsanitizer.php,v 1.2.20.2.2.1 2007/02/19 06:54:44 minahito Exp $ // ------------------------------------------------------------------------ // // XOOPS - PHP Content Management System // // Copyright (c) 2000 XOOPS.org // @@ -58,21 +58,24 @@ { $patterns = array("/([^]_a-z0-9-=\"'\/])([a-z]+?):\/\/([^, \r\n\"\(\)'<>]+)/i", "/([^]_a-z0-9-=\"'\/])www\.([a-z0-9\-]+)\.([^, \r\n\"\(\)'<>]+)/i", "/([^]_a-z0-9-=\"'\/])([a-z0-9\-_.]+?)@([^, \r\n\"\(\)'<>]+)/i"); $replacements = array("\\1<a href=\"\\2://\\3\" target=\"_blank\">\\2://\\3</a>", "\\1<a href=\"http://www.\\2.\\3\" target=\"_blank\">www.\\2.\\3</a>", "\\1<a href=\"mailto:\\2@\\3\">\\2@\\3</a>"); - return preg_replace($patterns, $replacements, $text); + $ret = preg_replace($patterns, $replacements, $text); + return $ret; } function &nl2Br($text) { - return preg_replace("/(\015\012)|(\015)|(\012)/","<br />",$text); + $ret = preg_replace("/(\015\012)|(\015)|(\012)/","<br />",$text); + return $ret; } function &addSlashes($text, $force=false) { if ($force) { - return addslashes($text); + $ret = addslashes($text); + return $ret; } if (!get_magic_quotes_gpc()) { - $text =& addslashes($text); + $text = addslashes($text); } return $text; } @@ -99,7 +102,8 @@ function &undoHtmlSpecialChars(&$text) { - return preg_replace(array("/>/i", "/</i", "/"/i", "/'/i"), array(">", "<", "\"", "'"), $text); + $ret = preg_replace(array("/>/i", "/</i", "/"/i", "/'/i"), array(">", "<", "\"", "'"), $text); + return $ret; } /*