[Pmwiki-users] Quoting http:/.... from within code invoke by $DoubleBrackets

Patrick R. Michaud pmichaud
Sat Jan 24 09:29:12 CST 2004


On Sat, Jan 24, 2004 at 02:20:41PM +0100, Christian Ridderstr?m wrote:
> Hi
> 
> Let's assume I have a this double bracket pattern:
> 	$DoubleBracket['/\\[\\[test\\]\\]/'] = 
> 		"<a href='http://www.something.org'>link</a>";
> 
> In this case, the final result will not be 'link' (where it's a link), 
> because some $LinkPatterns... will detect the 'http:' and manipulate it.
> 
> How could I prevent this from happening.

Use the Keep() function introduced in pmwiki-0.5.27...

   $DoubleBracket['/\\[\\[test\\]\\]/e'] = 
     'Keep("<a href=\'http://www.something.org\'>link</a>");";

> Could I quote the output of the DoubleBracke-replacement somehow?  
> Or is the result of a DoubleBracket-replacement by definition to be 
> further interpreted for additional PmWiki markup?

Double-bracket replacements are generally intended to be further 
interpreted for additional PmWiki markup--things such as [[$Title]], 
[[$Group]], etc., as well as being necessary for the implementation of
WikiTrails, FAQ, and a few other miscellaneous features.  

Pm



More information about the pmwiki-users mailing list