Home » HTTP » HTTP_Upload » Bug #6114
nameToSafe doesn't remove parens
Details
| Submitted | 2005-11-30 15:34 UTC |
|---|---|
| From | jgiglio at netmar dot com |
| Status | Bogus |
| Package | HTTP_Upload |
| PHP Version | 4.3.2 |
| OS | Linux |
| Roadmaps | (Not assigned) |
Comments
[2005-11-30 15:34 UTC] jgiglio at netmar dot com
Description:
------------
nameToSafe doesn't remove parentheses from file names, though it seems like the intent of the regex was to do so.
Test script:
---------------
Working paren removing regex:
echo preg_replace('/[\()]/', '_', "test (things)");
Current regex:
echo preg_replace('/[^a-zA-Z0-9,._\+\()\-]/', '_', "test (stuff)");
Even though the bottom regex contains \() in the char class, it doesn't remove parens from the input string.
Expected result:
----------------
Remove parentheses