Revision [2760]

This is an old revision of ValidPageNames made by JavaWoman on 2004-12-02 12:36:21.

 

Last edited by JavaWoman:
validtag comment
Thu, 02 Dec 2004 12:36 UTC [diff]


I open this page to discuss problems related to pagename validation and the underlying regex that are needed to validate and format both camelcase and forced links.


Current pattern for valid pagetags

$validtag = "/^[A-Z,a-z,ÄÖÜ,ßäöü]+[A-Z,a-z,0-9,ÄÖÜ,ßäöü]*$/s";


Some considerations off the cuff:

Apart from a possible "German" origin, I never understood the bias here to allowing German characters but not non-ASCII characters used in other languages. That said, I don't think an RE should look for a "word" but merely a "string-consisting-of-letters-and-digits-and-starting-with-a-letter". By using a hex encoding inside the RE for "letters" we would also make thsi encoding-independent, thus not limiting to ISO-8859-1 (why not a Turkish Wiki with Turkish page (and user) names?).
Also, the commas in that RE are puzzling - do we allow a Wiki name to start with or contain a comma? I think not - and in that case they should go.
Give me a moment and I'll come up with an alternative RE to match what I propose... --JavaWoman

References:
Uniform Resource Identifiers (URI): Generic Syntax
 




Current pattern for valid usernames

JavaWoman pointed out that Wikka currently restricts valid usernames to camelcase-formatted WikiName WikiNames. Is this consistent with the fact that we actually do allow valid pagetags in forced links beyond the camelcase format? And what about special characters in usernames?





I think that the current forced link formatter should be improved to allow GET parameters, anchors and titles to be parsed as part of valid internal links.

For example it would be nice if we could not only use forced links like:
[[HomePage Internal forced link]]
or
[[http://www.google.com External forced link]]
but also the following:

[[HomePage (? "par1=ba,par2=bo") Internal forced link]]
[[HomePage (# "this") Internal forced link]]
[[HomePage (§ "This is a link to the HomePage") Internal forced link]]

But I don't have a clue on how to modify the current formatter to send to the Link() function all this stuff.

-- DarTar






CategoryDevelopment CategoryRegex
There are 8 comments on this page. [Show comments]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki