Monday 11 December 2006 6:06:45 am
Hi!
<b>Short version:</b> Is there any way to use regexp to manipulate text strings (e.g. <i>$nick =~ s/[^a-zA-Z0-9]+//g</i>) in eZ? If so, how?
<b>Long version:</b> I'm setting up a chat section on our community site, using CGI::IRC and a local installation of ircd-ratbox. I want my users to have the same nickname both in eZ and on irc, and to do that, I generate the login-form from CGI::IRC myself, putting the eZ username (not the user account-username, but a normal text line-field (in order to allow more dynamic usernames)) in a hidden form-field. (The users are not allowed to alter nicknames on IRC, by restrictions in CGI::IRC and ratbox) The problem is that since our username-field allows special characters (~ > < _ %" etc), the login to irc fails. So, I need to strip of the special characters (<i>$nick =~ s/[^a-zA-Z0-9]+//g</i>) . There is a theoretical possibility of doing this in IRC::CGI after the form is submitted, but if eZ can handle it, that would be easier. Any ideas on how this could be done?
|