Revision [2754]
This is an old revision of ValidPageNames made by DarTar on 2004-12-02 11:02:36.
Pagename validation and link formatters
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:
- The German eszed (ß) can't appear at the beginning of a word in any language, so we might drop it from the first character class.
- If we are to allow accented characters in valid page tags (are we?), we should consider allowing also other characters like for instance èéêëñç that are part of the extended ASCII charset (iso-8859-1).
- We should prevent non-escaped URIs to be parsed as pagetags or at least encode them before applying a validator: try http://wikka.jsnx.com/ÄrgerMich.
A better formatter for forced internal links
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:- Forced internal link with URL parameter
[[HomePage (? "par1=ba,par2=bo") Internal forced link]]
- Forced internal link with anchor
[[HomePage (# "this") Internal forced link]]
=> http://wikka.jsnx.com/HomePage#this
- Forced internal link with Title
[[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