Tadashi Okoshi
slash****@users*****
2006年 6月 4日 (日) 11:45:47 JST
Index: affelio/lib/Affelio/misc/WebInput.pm
diff -u affelio/lib/Affelio/misc/WebInput.pm:1.9 affelio/lib/Affelio/misc/WebInput.pm:1.10
--- affelio/lib/Affelio/misc/WebInput.pm:1.9 Tue Mar 7 23:39:11 2006
+++ affelio/lib/Affelio/misc/WebInput.pm Sun Jun 4 11:45:47 2006
@@ -14,7 +14,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
-# $Id: WebInput.pm,v 1.9 2006/03/07 14:39:11 slash5234 Exp $
+# $Id: WebInput.pm,v 1.10 2006/06/04 02:45:47 slash5234 Exp $
use strict;
package Affelio::misc::WebInput;
@@ -23,6 +23,19 @@
use Affelio::exception::TaintedInputException;
use Affelio::misc::Debug qw(debug_print);
+ $Affelio::misc::WebInput::http_URL_regex =
+q{\b(?:https?|shttp)://(?:(?:[-_.!~*'()a-zA-Z0-9;:&=+$,]|%[0-9A-Fa-f} .
+q{][0-9A-Fa-f])*@)?(?:(?:[a-zA-Z0-9](?:[-a-zA-Z0-9]*[a-zA-Z0-9])?\.)} .
+q{*[a-zA-Z](?:[-a-zA-Z0-9]*[a-zA-Z0-9])?\.?|[0-9]+\.[0-9]+\.[0-9]+\.} .
+q{[0-9]+)(?::[0-9]*)?(?:/(?:[-_.!~*'()a-zA-Z0-9:@&=+$,]|%[0-9A-Fa-f]} .
+q{[0-9A-Fa-f])*(?:;(?:[-_.!~*'()a-zA-Z0-9:@&=+$,]|%[0-9A-Fa-f][0-9A-} .
+q{Fa-f])*)*(?:/(?:[-_.!~*'()a-zA-Z0-9:@&=+$,]|%[0-9A-Fa-f][0-9A-Fa-f} .
+q{])*(?:;(?:[-_.!~*'()a-zA-Z0-9:@&=+$,]|%[0-9A-Fa-f][0-9A-Fa-f])*)*)} .
+q{*)?(?:\?(?:[-_.!~*'()a-zA-Z0-9;/?:@&=+$,]|%[0-9A-Fa-f][0-9A-Fa-f])} .
+q{*)?(?:#(?:[-_.!~*'()a-zA-Z0-9;/?:@&=+$,]|%[0-9A-Fa-f][0-9A-Fa-f])*} .
+q{)?};
+
+
######################################################################
sub new{
my $class = shift;