[pmwiki-users] Disabling WikiWords in custom markup

Jeff Ullmann JeffUllmann at navio.com
Fri Dec 16 18:12:28 CST 2005


 
It appears to have been a bit of user error, the obvious solution worked,
but apparently I tried it when there were other problems.

What is appearing to work for me is:

In the wiki page
_av_Click
Here|`MFNGOfferNoShare|1|mfngPID=1019&mfngCID=18452&mfngNetCN=123063&mfngTit
leName=Alicia%20Keys%20-%20I%20dont%20like%20to%20share_av_ 

(notice the back tick before the offending item.

With the following custom Markup

Markup('av','links',
  '//(?>_av_([^|]+)[|][^|]+)[|][^|]+)[|][^|]+)_av_)/',
  "<a
href='javascript:window.top.Navio.Buy(\"$2\",\"$3\",\"$4\");'>$1</a>");


Short and sweet.

jU?

Navio Systems, Inc.

-----Original Message-----
From: Patrick R. Michaud [mailto:pmichaud at pobox.com] 
Sent: Wednesday, December 14, 2005 9:30 AM
To: Jeff Ullmann
Cc: pmwiki-users at pmichaud.com
Subject: Re: [pmwiki-users] Disabling WikiWords in custom markup

On Wed, Dec 14, 2005 at 09:15:07AM -0800, Jeff Ullmann wrote:
>  
> I am trying to create a Markup that will take something like
> 
> _av_Click
> Here|MFNGOfferNoShare|1|mfngPID=1019&mfngCID=18452&mfngNetCN=123063&mf
> Here|MFNGOfferNoShare|1|ngTitl
> eName=Alicia%20Keys%20-%20I%20dont%20like%20to%20share|_av_
> 
> And insert
> 
> <a
> href='javascript:window.top.Navio.Buy("MFNGOfferNoShare","1","mfngPID=
> 1019&m 
> fngCID=18452&mfngNetCN=123063&mfngTitleName=Alicia%20Keys%20-%20I%20do
> nt%20l
> ike%20to%20share");'>Click Here</a>
> 
> Into a wiki page.
> 
> I have some markup that works with one exception. Element 2, 
> "MFNGOfferNoShare", is getting treated as a WikiWord, which of course 
> breaks the link I'm trying to create.
> 
> The markup I've tried is relatively simple
> 
> Markup('av','inline',
>   "/(?>_av_([^|]+)[|]([^|]+)[|]([^|]+)[|]([^|]+)_av_)/",
>   "[=<a
> href='javascript:window.top.Navio.Buy(\"$2\",\"$3\",\"$4\");'>$1</a>=]
> ");
> 
> Any thoughts or suggestions?

The [=...=] markup is handled very early in the processing sequence, so it's
not really providing any protection here.  You probably want to use Keep(),
although keeping track of all of those nested quotes is going to be a real
pain.  Maybe:

  Markup('av','inline',
    "/(?>_av_([^|]+)[|]([^|]+)[|]([^|]+)[|]([^|]+)_av_)/e",
    "Keep('<a
href=\\'javascript:window.top.Navio.Buy(\"$2\",\"$3\",\"$4\");\\'>$1</a>')")
;

Pm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3133 bytes
Desc: not available
Url : /pipermail/pmwiki-users/attachments/20051216/6f5d49e3/attachment.bin 


More information about the pmwiki-users mailing list