[pmwiki-users] Passing a url as a string do a custome markup and using it
Patrick R. Michaud
pmichaud at pobox.com
Tue May 30 09:43:01 CDT 2006
On Tue, May 30, 2006 at 11:37:07AM +0200, Dominique Faure wrote:
> > I have a simple function that uses ParseArgs.
> > I have markup that looks like:
> > (:pmfeed
> > feed='http://news.google.com/nwshp?hl=en&ned=us&output=rss&q=linux':)
> >
> > Now.. .if I hard code the feed value to this URL inside of my php, it
> > works fine... but somehow I'm not getting the value correctly when
> > passed in from pmwiki. Is there some way of protecting it.. or at least
> > getting the actual value back??
> > [...]
>
> You may try undoing PmWiki's htmlspecialchars conversion, at least for
> the ampersands you have in url parameters. The following code is
> stolen from ASCIIMath recipe:
Dominique is correct here -- PmWiki converts ampersands in markup
to '&' before processing it. So, you'll want to reverse that:
$feed = str_replace('&', '&', $feed);
Pm
More information about the pmwiki-users
mailing list