|
Posted by Beauregard T. Shagnasty on 05/13/07 22:58
In alt.www.webmaster, Alfred Molon wrote:
> For instance, if I upload the file "Al Azhar's mosque Cairo.jpg" (with
> the apostrophe), the PHP code will automatically convert the filename
> to "Al Azhar\'s mosque Cairo.jpg" (i.e. insert a backslash) and store
> a file named "Al Azhar\'s mosque Cairo.jpg" in the temporary
> directory.
>
> Then for misterious reasons it will convert the filename to "Al Azhar
> \\\'s mosque Cairo.jpg" (i.e. insert two more backslashs). This
> happens after the filename has been passed as a POST parameter to
> another script.
Look up htmlentities.
Though it would likely be much easier if you were to strip out all
characters except alpha, numeric, and the underscore prior to storage
(file and database entry). Perhaps replace spaces with underscores.
--
-bts
-Motorcycles defy gravity; cars just suck
Navigation:
[Reply to this message]
|