[pmwiki-users] Custom markup with search data in URL

Chris Cox ccox at airmail.net
Tue Jun 21 11:20:17 CDT 2005


For example my markup (directive) function
returns:

return "%newwin% [[http://www.wikipedia.com/wiki/Special:Search?search=\"$item\"&go=Go|$item]]";

Assuming item is something like "impress me"

I'd get:

http://www.wikipedia.com/wiki/Special:Search?search="impress me"&go=Go

Now that would work just fine in a URL to a browser... though not
ideal... should read:

http://www.wikipedia.com/wiki/Special:Search?search=%22impress+me%22&go=Go

but it would work like the earlier as well...

HOWEVER, pmwiki is changing the item area to...
%22impress%20me%22

and it's shows up in my url line when I go to wikipedia as:
http://en.wikipedia.org/wiki/Special:Search?search=%252522impress%252520me%252522&go=Go

So... I know there are functions to URL-ize strings probably in PHP... but
I'm needing help to figure out what pmwiki + PHP things to do here.

Any easy suggestions?





More information about the pmwiki-users mailing list