SourceForge has been redesigned. Learn more.
Close

Diff of /branches/2.6/cgi-bin/yabb2/Sources/Post.pm [r1472] .. [r1473]  Maximize  Restore

Switch to side-by-side view

--- a/branches/2.6/cgi-bin/yabb2/Sources/Post.pm
+++ b/branches/2.6/cgi-bin/yabb2/Sources/Post.pm
@@ -18,7 +18,7 @@
 use CGI::Carp qw(fatalsToBrowser);
 our $VERSION = '2.6.0';
 
-$postpmver = 'YaBB 2.6.0 $Revision: 1464 $';
+$postpmver = 'YaBB 2.6.0 $Revision: 1473 $';
 if ( $action eq 'detailedversion' ) { return 1; }
 
 LoadLanguage('Post');
@@ -2923,13 +2923,13 @@
     }
     if ( length( $FORM{'name'} ) > 25 ) { Preview( $post_txt{'568'} ); }
     if ( $FORM{'email'} eq q{} ) { Preview( $post_txt{'76'} ); }
-    if ( $FORM{'email'} !~ /[\w\-\.\+]+\@[\w\-\.\+]+\.(\w{2,4}$)/xsm ) {
+    if ( $FORM{'email'} !~ /^[\w\-\.\+]+\@[\w\-\.\+]+\.\w{2,4}$/xsm ) {
         Preview("$post_txt{'240'} $post_txt{'69'} $post_txt{'241'}");
     }
     if (
-        ( $FORM{'email'} =~ /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)|(\.$)/xsm )
-        || ( $FORM{'email'} !~
-            /^.+@\[?(\w|[-.])+\.[a-zA-Z]{2,4}|[0-9]{1,4}\]?$/xsm )
+        $FORM{'email'} =~ /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)|(\.$)/xsm
+        || $FORM{'email'} !~
+            /^.+@\[?(\w|[-.])+\.[a-zA-Z]{2,4}|[0-9]{1,4}\]?$/xsm
       )
     {
         Preview( $post_txt{'500'} );