[pmwiki-devel] Why does the PageVar markup accept ! as the first page name character?

Eemeli Aro eemeli at gmail.com
Wed May 5 04:12:14 CDT 2010


I can't figure this one out. The PageVar function was introduced in
2.1.beta15, and since then the Markup pattern for it has gone from:

Markup('{$var}', '>$[phrase]',
  '/\\{(!?[-\\w.\\/]*)(\\$\\w+)\\}/e',
  "htmlspecialchars(PageVar(\$pagename, '$2', '$1'), ENT_NOQUOTES)");

to currently:

Markup('{$var}', '>$[phrase]',
  '/\\{(\\*|!?[-\\w.\\/\\x80-\\xff]*)(\\$:?\\w+)\\}/e',
  "PRR(PVSE(PageVar(\$pagename, '$2', '$1')))");

Why can you have a ! as the first character of the page name? PageVar
first looks into $Cursor and then passes the string to MakePageName.
Nothing sets $Cursor['!'] and MakePageName strips the charcter from
the string.

I've looked at the code, the documentation, and the original
announcement <http://www.pmichaud.com/pipermail/pmwiki-users/2005-December/021272.html>
and I haven't found any explanation. My best guess is that there was a
planned ability to use a !Category for the page name that never got
implemented.

Help?

eemeli



More information about the pmwiki-devel mailing list