richter 2002/08/20 22:44:10
Modified: . Tag: Embperl2c Changes.pod
Embperl/Form Tag: Embperl2c Validate.pm
Embperl/Form/Validate Tag: Embperl2c Default.pm
Log:
- Fixed problems with form validation
Revision Changes Path
No revision
No revision
1.129.4.87 +3 -3 embperl/Changes.pod
Index: Changes.pod
===================================================================
RCS file: /home/cvs/embperl/Changes.pod,v
retrieving revision 1.129.4.86
retrieving revision 1.129.4.87
diff -u -r1.129.4.86 -r1.129.4.87
--- Changes.pod 5 Jul 2002 07:16:49 -0000 1.129.4.86
+++ Changes.pod 21 Aug 2002 05:44:09 -0000 1.129.4.87
@@ -7,11 +7,11 @@
- libxml now searchs through Embperl search path when includeing external
entities,
so for example <xsl:include> directives searchs files the same way as Execute
does under Embperl::Object.
- - fixed typo in JavaScript code for Form::Validate
+ - fixed typo in JavaScript code for Form::Validate reported by Axel Beckert
- fixed typo in Embperl::Mail reported by Axel Beckert.
- fixed small bugs in Embperl::Form::Validate test code reported by Axel
Beckert.
- - charcters 128-160 are now escaped in URL's to avoid problems with Mozilla.
-
+ - charcters 128-160 are now escaped in URLs to avoid problems with Mozilla.
+ - fixed missing escaping of '/' in Embperl::Form::Validate JS routines. [fixed
by abe]
=head1 2.0b8 (BETA) 25. Juni 2002
No revision
No revision
1.1.2.14 +3 -3 embperl/Embperl/Form/Attic/Validate.pm
Index: Validate.pm
===================================================================
RCS file: /home/cvs/embperl/Embperl/Form/Attic/Validate.pm,v
retrieving revision 1.1.2.13
retrieving revision 1.1.2.14
diff -u -r1.1.2.13 -r1.1.2.14
--- Validate.pm 5 Jul 2002 07:58:35 -0000 1.1.2.13
+++ Validate.pm 21 Aug 2002 05:44:10 -0000 1.1.2.14
@@ -382,7 +382,7 @@
}
$txt = $epreq -> gettext($id) if (!$txt && $epreq) ;
$txt ||= "Missing Message $id: %0 %1 %2 %3" ;
- my $id = $param -> [0] ;
+ $id = $param -> [0] ;
$param -> [0] = $name ;
$txt =~ s/%(\d+)/$param->[$1]/g ;
$param -> [0] = $id ;
No revision
No revision
1.1.2.8 +5 -3 embperl/Embperl/Form/Validate/Attic/Default.pm
Index: Default.pm
===================================================================
RCS file: /home/cvs/embperl/Embperl/Form/Validate/Attic/Default.pm,v
retrieving revision 1.1.2.7
retrieving revision 1.1.2.8
diff -u -r1.1.2.7 -r1.1.2.8
--- Default.pm 5 Jul 2002 07:58:35 -0000 1.1.2.7
+++ Default.pm 21 Aug 2002 05:44:10 -0000 1.1.2.8
@@ -134,7 +134,7 @@
{
my ($self, $key, $value, $arg, $fdat, $pref) = @_ ;
- return defined($value) ? undef : [] ;
+ return !defined($value) || $value eq '' ? [] : undef ;
}
# --------------------------------------------------------------
@@ -331,6 +331,7 @@
{
my ($self, $arg, $pref) = @_ ;
+ $arg =~ s(/)(\\/)g; # JS needs / escaping
return ("obj.value.search(/$arg/) >= 0", ['validate_matches_regex',
"'+obj.value+'", $arg]) ;
}
@@ -358,6 +359,7 @@
{
my ($self, $arg, $pref) = @_ ;
+ $arg =~ s(/)(\\/)g; # JS needs / escaping
return ("obj.value.search(/$arg/) < 0", ['validate_matches_regex',
"'+obj.value+'", $arg]) ;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]