Re: Sanitize and hyphens

2007-03-08 Thread bernardo
But why do hyphens need to be escaped in the first place? I looked at the function cleanValue (that is called by cleanArray) and it makes several replacements, some of them look weird, for example: $val = str_replace("!", "!", $val); $val = str_replace("'", "'", $val); I guess the intention was

Re: Sanitize and hyphens

2007-03-07 Thread Dr. Tarique Sani
On 3/8/07, squidliberty <[EMAIL PROTECTED]> wrote: > How should I be handling this? My best solution was to create a > fixSafeChar() function to convert the hyphens back. But this seems > pretty crude. Thats what I have done as well... However, the problem is usually in the URLs and emails - a b

Sanitize and hyphens

2007-03-07 Thread squidliberty
I have several areas of my site where it is necessary to sanitize large amounts of user form data. cleanArray() makes this process a breeze - however, I have found that it replaces hyphens ('-') with the htmlentity equivalent ('-'). This is a big problem for email addresses, which may contain hyph