[pmwiki-users] Can any of the form recipes do this?

Patrick R. Michaud pmichaud at pobox.com
Mon Apr 2 15:09:40 CDT 2007


On Mon, Apr 02, 2007 at 08:40:06PM +0100, Hans wrote:
> Monday, April 2, 2007, 8:37:55 PM, Patrick wrote:
> 
> > For names coming via a form POST, I think the valid names
> > are limited to the pattern "[A-Za-z][-_:.\w]*" [1].  So this
> > would be something like:
> 
> >     "/\\{\\$\\$([A-Za-z][-_:.\\w]*)\\}/e"
> 
> this does not include name[0] name[1] etc and name[]
> in which a name is an array. I think it is allowed to have an array as
> a $_POST value. It does work, just a bit painful to process.

Oh, this is an excellent point.  PHP allows it, yes, but AFAICT it's 
not valid HTML.  However, given that we'd likely want to allow 
brackets in names (as PHP does), I'd change the pattern to
something like:

  "/\\{\\$\\$([A-Za-z][-_:.\\w\\[\\]]*)\\}/e"

which allows brackets in the names.

Pm



More information about the pmwiki-users mailing list