[xwiki-devs] Valid XWiki Page Names
Hello Devs, is there some Documentation (or a Regex) which Characters are practically allowed in page and space names? I am unable to find this. From the syntax page it is kind of clear that the following ones are not really usable: "." Because of Space Prefix "[]" Link itself "()%" new formatting characters ">" alias of links I was playing around and if you enter some page name like "hello.hello.hello" you'll get a page named "hello" in the Space "hello.hello". If you enter "hello\.hello" it'll just display nothing. (on XWiki 1.7 M2) Maybe XWiki should check if the given page or space name is actually valid, before creating the page? Nice greetings Jonas
Hi Jonas, This is an area that we need to improve. There's currently no check on page names but as you guessed we have some limitations so we need to add some checks. I need to update the XWiki Syntax page since the link separator is now
instead of >
So the current rules (As far I can imagine them) are: * no "[[" or "]]" * no ">>" * no ":" (since it's used as the subwiki name) * no ".". Note that the dot is currently allowed (the first dot separates the space from the page name) - We need to forbid it in the future since we want to add support for hierarchical spaces. Right now the document name parsing is still using the old code so you shouldl currently get the same behavior as with xwiki 1.0 syntax Thanks for raising this -Vincent On Nov 20, 2008, at 9:44 PM, Jonas von Malottki wrote:
Hello Devs,
is there some Documentation (or a Regex) which Characters are practically allowed in page and space names? I am unable to find this.
From the syntax page it is kind of clear that the following ones are not really usable: "." Because of Space Prefix "[]" Link itself "()%" new formatting characters ">" alias of links
I was playing around and if you enter some page name like "hello.hello.hello" you'll get a page named "hello" in the Space "hello.hello". If you enter "hello\.hello" it'll just display nothing. (on XWiki 1.7 M2)
Maybe XWiki should check if the given page or space name is actually valid, before creating the page?
Nice greetings Jonas _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
There is $util.clearName(..) api to transform a text to a valid page name.. There is $xwiki.getUniquePageName to additionally generate a unique unused one Ludovic Vincent Massol wrote:
Hi Jonas,
This is an area that we need to improve. There's currently no check on page names but as you guessed we have some limitations so we need to add some checks.
I need to update the XWiki Syntax page since the link separator is now
instead of >
So the current rules (As far I can imagine them) are: * no "[[" or "]]" * no ">>" * no ":" (since it's used as the subwiki name) * no ".". Note that the dot is currently allowed (the first dot separates the space from the page name) - We need to forbid it in the future since we want to add support for hierarchical spaces.
Right now the document name parsing is still using the old code so you shouldl currently get the same behavior as with xwiki 1.0 syntax
Thanks for raising this -Vincent
On Nov 20, 2008, at 9:44 PM, Jonas von Malottki wrote:
Hello Devs,
is there some Documentation (or a Regex) which Characters are practically allowed in page and space names? I am unable to find this.
From the syntax page it is kind of clear that the following ones are not really usable: "." Because of Space Prefix "[]" Link itself "()%" new formatting characters ">" alias of links
I was playing around and if you enter some page name like "hello.hello.hello" you'll get a page named "hello" in the Space "hello.hello". If you enter "hello\.hello" it'll just display nothing. (on XWiki 1.7 M2)
Maybe XWiki should check if the given page or space name is actually valid, before creating the page?
Nice greetings Jonas _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Ludovic Dubost Blog: http://blog.ludovic.org/ XWiki: http://www.xwiki.com Skype: ldubost GTalk: ldubost
I think clearName is a bit oldish would benefit being revisited in the light of the architecture refactoring we have started (especially when we'll start the new Model module). For example it cleans accents that we may want to keep. It also cleans characters such as comma (",") which could be valid if we wanted. The rules I put below are the ones that clash with the new XWiki Syntax 2.0. I forgot some like all formatting syntaxes (**, //, etc) + the escape symbol (~) and probably some more. -Vincent On Nov 25, 2008, at 11:45 PM, Ludovic Dubost wrote:
There is $util.clearName(..) api to transform a text to a valid page name.. There is $xwiki.getUniquePageName to additionally generate a unique unused one
Ludovic
Vincent Massol wrote:
Hi Jonas,
This is an area that we need to improve. There's currently no check on page names but as you guessed we have some limitations so we need to add some checks.
I need to update the XWiki Syntax page since the link separator is now
instead of >
So the current rules (As far I can imagine them) are: * no "[[" or "]]" * no ">>" * no ":" (since it's used as the subwiki name) * no ".". Note that the dot is currently allowed (the first dot separates the space from the page name) - We need to forbid it in the future since we want to add support for hierarchical spaces.
Right now the document name parsing is still using the old code so you shouldl currently get the same behavior as with xwiki 1.0 syntax
Thanks for raising this -Vincent
On Nov 20, 2008, at 9:44 PM, Jonas von Malottki wrote:
Hello Devs,
is there some Documentation (or a Regex) which Characters are practically allowed in page and space names? I am unable to find this.
From the syntax page it is kind of clear that the following ones are not really usable: "." Because of Space Prefix "[]" Link itself "()%" new formatting characters ">" alias of links
I was playing around and if you enter some page name like "hello.hello.hello" you'll get a page named "hello" in the Space "hello.hello". If you enter "hello\.hello" it'll just display nothing. (on XWiki 1.7 M2)
Maybe XWiki should check if the given page or space name is actually valid, before creating the page?
Nice greetings Jonas _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Ludovic Dubost Blog: http://blog.ludovic.org/ XWiki: http://www.xwiki.com Skype: ldubost GTalk: ldubost
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
participants (3)
-
Jonas von Malottki -
Ludovic Dubost -
Vincent Massol