Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 3.2.16

Bug #1252 getValue() on file element returns not 'cleaned' file name
Submitted: 2004-04-21 13:13 UTC
From: Sebastian[c u t me] dot Baran at dialcom dot com dot pl Assigned: avb
Status: Closed Package: HTML_QuickForm
PHP Version: Irrelevant OS:
Roadmaps: (Not assigned)    
Subscription  


 [2004-04-21 13:13 UTC] Sebastian[c u t me] dot Baran at dialcom dot com dot pl
Description: ------------ HTML_QuickForm - 3.2.2 ------------------------ $file_elem=$form->getElement('my_file'); .. .. $tmp=$file_elem->getValue(); when uploaded file's name contains ' and magic_quotes_gpc is ON gives filename backslashed. It's for example in French language: "Détails D'Ordre.doc" becomes "Détails D\'Ordre.doc" Reproduce code: --------------- // magic_quotes_gpc MUST BE ON! $form->addElement('file', 'myfile', 'File to upload:'); $file_elem=$form->getElement('myfile'); .. .. $tmp=$file_elem->getValue(); var_dump($tmp); then upload file with ' in name ("Détails D'Ordre.doc") Expected result: ---------------- "Détails D'Ordre.doc" as file name Actual result: -------------- "Détails D\'Ordre.doc" as file name

Comments

 [2004-05-08 13:43 UTC] avb
Seems trivial to fix. Will do this soon.
 [2004-05-12 10:38 UTC] avb
Fixed in CVS