[pmwiki-users] Missing function in MarkupExpr (was:Skins authors and users : (in)Valid XHTML)
Petko Yotov
5ko at free.fr
Sat Aug 11 08:30:26 CDT 2007
On Saturday 11 August 2007, Patrick R. Michaud wrote:
> On Sat, Aug 11, 2007 at 12:31:03PM +0200, Dominique Faure wrote:
> > I was just toying with the skin test page [1] in order to embed a link
> > to check the page validity, trying to write this as:
> >
> > Look %newwin%
> > [[http://validator.w3.org/check?verbose=1&uri={$ScriptUrl}?n={*$FullName}
> >&skin={$Skin}|here]] what the W3C Markup Validation Service says about
> > this page...
> >
> > and just found that the resulting url may not be always valid.
> > [...]
> > Anyway, this would be better to have some kind of dedicated Markup
> > expression to handle this such as:
> >
> > {(urlencode http://www.pmwiki.org/wiki)}
> >
> > http%3A%2F%2Fwww.pmwiki.org%2Fwiki
> >
> > Should I open a PITS entry for this?
>
> I'm not sure that this warrants a dedicated function in the
> core. We can open a PITS entry for people to vote on it... but
> given that this is the first time something like this has been
> needed, PmWikiPhilosophy #3 would seem to apply.
>
> Thanks!
>
> Pm
Replying to Dominique:
You can have this by adding to config.php:
$MarkupExpr['urlencode'] = 'urlencode($args[0])';
It works then, in the pge like this:
{(urlencode "{$PageUrl}?skin=SuperSlick")}
Thanks,
Petko
More information about the pmwiki-users
mailing list