> -----Original Message-----
> From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk]
> Sent: Monday, September 07, 2009 1:24 PM
> To: Skip Evans
> Cc: php-general@lists.php.net
> Subject: Re: [PHP] Displaying image paths with spaces
> 
> On Mon, 2009-09-07 at 12:14 -0500, Skip Evans wrote:
> > Ashley Sheridan wrote:
> > >
> > > How are you outputting those URLs? PHP won't just automatically
> converty
> > > '%20' to a '\ '.
> > >
> > > What is the raw URL format you're getting from FCKEditor?
> > >
> > > Thanks,
> > > Ash
> > > http://www.ashleysheridan.co.uk
> > >
> >
> > The raw code in the FCKeditor looks like this:
> >
> >
> src="/clients/client_118/images//Event%20images/Show%20ads/catspaw1comp
> ressed.jpg"
> >
> > (withing an <img...> tag of course)
> >
> > But when the page displays and the images do not appear,
> > viewing the image's properties shows this: (Notice the %5C).
> > That %5C is what I think is being converted to a slash. Why it
> > shows up is baffling me.
> >
> >
> http://penguinsites.com/clients/client_118/images//Event%5C%20images/Sh
> ow%5C%20ads/catspaw1compressed.jpg
> >
> > I simply output the code from the FCKeditor with a plain echo
> > to the browser.
> >
> > But then if I right-click the image to view it, that's when I
> > see this
> >
> > The requested URL /clients/client_118/images//Event\
> > images/Show\ ads/catspaw1compressed.jpg was not found on this
> > server.
> >
> > So it seems it's not preserving the %20 as coded spaces, and
> > also converting that %5C to a slash!
> >
> > Whaaaa????
> >
> > Thanks,
> > Skip
> >
> > --
> > ====================================
> > Skip Evans
> > Big Sky Penguin, LLC
> > 503 S Baldwin St, #1
> > Madison WI 53703
> > 608.250.2720
> > http://bigskypenguin.com
> > ------------------------------------
> > Those of you who believe in
> > telekinesis, raise my hand.
> >   -- Kurt Vonnegut
> >
> I believe %5C is the http code for %.
> 
> Are you saying then that FCKEditor is sending the %20 encoded URL when
> you submit the form? I've not had any problems using FCKEditor myself.
> Have you tried using str_replace('%20', ' ', $url) on the URL when you
> receive it from the form?
> 
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
> 
> 

Actually, %5C is a \ character, % is %25 
Why it is adding a character that is used in local address strings is
baffling and I think a clue as to what is going on. Is it possible it is
mashing a local file address into a web address? 

BTW, IMHO using spaces in folder and/or file names is bad practice and
should be avoided.

Marc Hall
HallMarc Websites
610.446.3346
 

__________ Information from ESET Smart Security, version of virus signature
database 4403 (20090907) __________

The message was checked by ESET Smart Security.

http://www.eset.com
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to