[Pmwiki-users] Re: null characters or pattern breaking characters

Patrick R. Michaud pmichaud
Wed Jan 14 08:25:41 CST 2004


On Wed, Jan 14, 2004 at 01:56:10PM +0100, Christian Ridderstr?m wrote:
> I forgot to send this for a few days, so I hope it's still useful :-)

It is very useful.  :-)

> On Mon, 12 Jan 2004, Patrick R. Michaud wrote:
> > 1.  It'd be really handy if the "null character" sequence began
> > with a character that's already not considered to be part of a valid
> > URI.  In PmWiki that set is currently
> >         space  <  >  [  ]  "  '  (  )
> 
> Why would it be handy?

Because the null character could then be handled with one substitution (at 
$InlineReplacements) instead of two.

> > 2.  After re-reading RFC 2396 and RFC 2732, it's apparent that there are
> > a characters that are not allowed in URIs that PmWiki currently
> > allows.  
> 
> I agree that pmwiki definitely shouldn't include the characters above in 
> URIs (the user will just have to write them using %xx).

Good to know.  :-)

> [...] OTOH, using some different alternative null tokens, 
> any of these alternatives could be used:
> 
> token=	&NULL;			&;		    ``
> 	[[&NULL;include:...]]	[[&;include:...]]   [[``include:...]]

I like the use of `` for a null token.  I think it would only cause
difficulties in TeX documents that use it for leading double-quotes.
&; is nice since it looks like a null character element, but has to be
handled with two substitutions to keep it from appearing in a URI pattern.

> A parallell idea: Maybe backticks could escape directives? E.g.
> 	`[[include:...]]
> I'm not sure about the implementation though... what would this produce:
> 	`[[http://www.bla.org [[http://www.bla.org]]]]

Another good idea.  I'd suspect that the latter item would produce
    [[http://www.bla.org [1]]]  where [1] is a link to the site.

Pm



More information about the pmwiki-users mailing list