[pmwiki-users] Re: Re: Include bug or feature

chr at home.se chr at home.se
Thu Feb 3 16:25:41 CST 2005


On Thu, 3 Feb 2005, Patrick R. Michaud wrote:

> > Eh.. why does '!@$' translate to the current page? Is it because the 
> > regexp evalues the match or something?
> 
> Whatever comes after the "include" is passed to MakePageName() to be
> converted into a valid pagename.  If there aren't any valid pagename
> characters, MakePageName tends to return the current page.  (At least,
> it did at one time -- I don't know if it still works this way.)

If you don't already have it, I think you should have a predicate 
function such as

	IsValidPageName()

That reminds me, is there a predicate such as PageExists()?

> However, maybe the real solution is to solve this by requiring the thing 
> following "include" to begin with a letter or a digit, since there's 
> not anything else that would constitute a valid pagename.

Eh.. why not make use of a predicate such as the one above? Or do you for 
some specific reason (performance) want to use regular expressions 
directly?

/Christian

-- 
Christian Ridderström, +46-8-768 39 44               http://www.md.kth.se/~chr





More information about the pmwiki-users mailing list