plugins/SpecialUserFuncs.php
changeset 270 5bcdee999015
parent 263 d57af0b0302e
child 271 f088805540ae
child 286 b2f985e4cef3
equal deleted inserted replaced
269:06db76725891 270:5bcdee999015
   653             
   653             
   654             // Username
   654             // Username
   655             if(!namegood)
   655             if(!namegood)
   656             {
   656             {
   657               //if(frm.username.value.match(/^([A-z0-9 \!@\-\(\)]+){2,}$/ig))
   657               //if(frm.username.value.match(/^([A-z0-9 \!@\-\(\)]+){2,}$/ig))
   658               var regex = new RegExp('^([^<>_&\?]+){2,}$', 'ig');
   658               var regex = new RegExp('^([^<>&\?]+){2,}$', 'ig');
   659               if ( frm.username.value.match(regex) )
   659               if ( frm.username.value.match(regex) )
   660               {
   660               {
   661                 document.getElementById('s_username').src='<?php echo scriptPath; ?>/images/unknown.gif';
   661                 document.getElementById('s_username').src='<?php echo scriptPath; ?>/images/unknown.gif';
   662                 document.getElementById('e_username').innerHTML = ''; // '<br /><small><b>Checking availability...</b></small>';
   662                 document.getElementById('e_username').innerHTML = ''; // '<br /><small><b>Checking availability...</b></small>';
   663               } else {
   663               } else {
   715           {
   715           {
   716             var frm = document.forms.regform;
   716             var frm = document.forms.regform;
   717             
   717             
   718             if(!namegood)
   718             if(!namegood)
   719             {
   719             {
   720               <?php
   720               var regex = new RegExp('^([^<>&\?]+){2,}$', 'ig');
   721               // sorry for this ugly hack but jedit gets f***ed otherwise
   721               if ( frm.username.value.match(regex) )
   722               echo 'if(frm.username.value.match(/^([A-z0-9 \.:\!@\#\*]+){2,}$/ig))';
       
   723               ?>
       
   724               {
   722               {
   725                 document.getElementById('s_username').src='<?php echo scriptPath; ?>/images/unknown.gif';
   723                 document.getElementById('s_username').src='<?php echo scriptPath; ?>/images/unknown.gif';
   726                 document.getElementById('e_username').innerHTML = '';
   724                 document.getElementById('e_username').innerHTML = '';
   727               } else {
   725               } else {
   728                 document.getElementById('s_username').src='<?php echo scriptPath; ?>/images/bad.gif';
   726                 document.getElementById('s_username').src='<?php echo scriptPath; ?>/images/bad.gif';