PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » HTTP » HTTP_Upload » Bug #6114

nameToSafe doesn't remove parens

Details

Submitted2005-11-30 15:34 UTC
Fromjgiglio at netmar dot com
StatusBogus
PackageHTTP_Upload
PHP Version4.3.2
OSLinux
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