Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Passing a URL with spaces in it.

Quote Reply
Passing a URL with spaces in it.
Hi:

I am just not experienced enough to know how to deal with this (or if it is even possible!)

I want to pass a URL in an e-mail, and it has spaces in it. I was just passing the ID, which had no spaces, but "11" would also match "110" and "111" and on and on- so I thought I would and an "AND Title=<%Title%>

Well, if the Title is Snow White and the Seven Dwarfs, this URL:

http://path.to/db.cgi?db=Links&do=modify_search_results&ID=2729&Title-opt=LIKE&Title=Snow White and the Seven Dwarfs

will come across as:

http://path.to/db.cgi?db=Links&do=modify_search_results&ID=2729&Title-opt=LIKE&Title=Snow

(I added the '&Title-opt=LIKE' when I noticed this...)

For the most part, this is good enough, but I just think it is not right. I know that when passed in a browser, the spaces turn into '\%20' (without the '\'- had to do that to make it visible!). Is there an EASY way to do this in my report an error Mail, or should I just live with it?

thanks!

dave

Quote Reply
Re: Passing a URL with spaces in it. In reply to
Sounds like an IMPROPERLY formatted query in your jump.cgi or whatever file. Use ww=1 parameter. And you will find the EXACT ID record.

Regards,

Eliot Lee
Quote Reply
Re: Passing a URL with spaces in it. In reply to
>> LIKE&Title=Snow White and the Seven Dwarfs

LIKE&Title=Snow White and the Seven Dwarfs





PUGDOGŪ Enterprises, Inc.
FAQ:http://LinkSQL.com/FAQ
Forum:http://LinkSQL.com/forum
Quote Reply
Re: Passing a URL with spaces in it. In reply to
Eliot:

Thanks- that looks like the answer!

Pugdog- I am not sure what you mean...

dave

Quote Reply
Re: Passing a URL with spaces in it. In reply to
Eliot:

I use it to pass on errors that visitors might see when on my site. Kind of a version of a Bad Link mod, but for me, someone might pass on, 'Oh, this cartoon was directed by So and So." so I want to edit it right off.

Basiically, the code is passed on in an e-mail to me, like a "Validate Links" sort of e-mail.
\
ANYWAY, I changed the link to:

$CFG->{admin_root_url}/db.cgi?db=Links&do=modify_search_results&ID=$id&ww=1

Is that what you meant?

dave

Quote Reply
Re: Passing a URL with spaces in it. In reply to
yes...but if it is within an NON-admin script, then you need to use more codes.....

Regards,

Eliot Lee
Quote Reply
Re: Passing a URL with spaces in it. In reply to
Eliot:

Tested it, worked like a charm- but then you knew it would! Thanks! Eeasy fix!

dave

Quote Reply
Re: Passing a URL with spaces in it. In reply to
You're welcome.

Regards,

Eliot Lee
Quote Reply
Re: Passing a URL with spaces in it. In reply to
Hi,

You can also replace spaces with pluses (+).

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: Passing a URL with spaces in it. In reply to
Alex:

Thanks.... but, if $title = "Snow White and the Seven Dwarfs", how would you change that to "Snow+White+and+the+seven+dwarfs"... I mean you could s/, but that means running a scxript- I just wanted to pass the variaben an e-mail, like the e-mail confiormation you get, but with the Title in the URL, which made the spaces bad. The ww=1 thing works great!

dave