plugins/SpecialUserFuncs.php
changeset 271 f088805540ae
parent 266 917dcc6c4ceb
parent 270 5bcdee999015
child 304 e2cb5f1432c8
--- a/plugins/SpecialUserFuncs.php	Sat Nov 17 22:25:37 2007 -0500
+++ b/plugins/SpecialUserFuncs.php	Sun Nov 18 20:37:08 2007 -0500
@@ -820,7 +820,7 @@
             if(!namegood && ( field.name == 'username' || field.name == '_nil' ) ) 
             {
               //if(frm.username.value.match(/^([A-z0-9 \!@\-\(\)]+){2,}$/ig))
-              var regex = new RegExp('^([^<>_&\?]+){2,}$', 'ig');
+              var regex = new RegExp('^([^<>&\?]+){2,}$', 'ig');
               if ( frm.username.value.match(regex) )
               {
                 document.getElementById('s_username').src='<?php echo scriptPath; ?>/images/unknown.gif';
@@ -885,10 +885,8 @@
             
             if(!namegood)
             {
-              <?php
-              // sorry for this ugly hack but jedit gets f***ed otherwise
-              echo 'if(frm.username.value.match(/^([A-z0-9 \.:\!@\#\*]+){2,}$/ig))';
-              ?>
+              var regex = new RegExp('^([^<>&\?]+){2,}$', 'ig');
+              if ( frm.username.value.match(regex) )
               {
                 document.getElementById('s_username').src='<?php echo scriptPath; ?>/images/unknown.gif';
                 document.getElementById('e_username').innerHTML = '&nbsp;';