For all strings in regexps:
authorfidian <fidian@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 5 Feb 2001 21:13:53 +0000 (21:13 +0000)
committerfidian <fidian@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 5 Feb 2001 21:13:53 +0000 (21:13 +0000)
 * PHP first unescapes the string
 * PHP sends string to ereg, ereg_replace, or whatever
 * ereg/ereg_replace/whatever unescapes the string to make the regexp

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1057 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/addressbook.php

index 4d04355..fe2796f 100644 (file)
            $userdata['nickname'] = $userdata['email'];
         }
 
-        if(eregi('[ \:\|\#\"\!]', $userdata['nickname'])) {
+        if(eregi('[ \\:\\|\\#\\"\\!]', $userdata['nickname'])) {
            $this->error = _("Nickname contain illegal characters");
            return false;
         }