[Pmwiki-users] free links and illegal character behavior.

Patrick R. Michaud pmichaud
Thu Apr 8 09:28:53 CDT 2004


On Wed, Apr 07, 2004 at 10:50:53PM -0400, Kass Lloyd wrote:
> Would it be possible to have an option to make the wiki strip out
> illegal characters in a free link then create a page. I have things like
> "OM-101" that I want to create a page for, but I can't make a free link
> around that.
> 
> Any advice?

Hyphens are valid in free links, thus  {{OM-101}} would in fact work 
just fine.  

But to answer the larger question, it's probably possible but messy to 
strip illegal characters out of a freelink.  Currently
PmWiki looks for freelinks that match a certain pattern (given by
$FreeLinkPattern), and it's a messy pattern to follow.  

I'm thinking that it might be worthwhile to redesign the freelink 
code so that anything between {{ and }} would be considered a valid 
freelink, with invalid characters being stripped when forming the
pagename.  Thus {{Don't panic}} would be a valid free link and would
link to a page called "DontPanic".  

In this scenario, $FreeLinkPattern would likely change to something
like "{{.*?}}" and the free link processing handled by the FreeLinks
function (introduced in 0.6).  Compatibility with existing systems
could be preserved by continuing to use the old FreeLinkPattern.

Pm



More information about the pmwiki-users mailing list