[xwiki-devs] [Discussion] Filtering document names at creation time?
Hi, I'd like to discuss about filtering document names when they are created, i.e directly in the XWikiDocument.setFullName()/setName()/ setSpace()/setDatabase() methods. We could filter out (i.e. remove) the following characters: * pipe: | * greater than: > * brackets: [ and ] * apostrophe: ' * quote: " * colon: : * dot: . * forward slash: / Any other? The reason for ., :, |, >, [ and ] is because these are reserved characters in wiki link format. Another option is to allow some escaping for these chars when writing a wiki link. Last we need to think about documents in the DB and which already have these chars. Should we write a migrator to filter these chars too? Probably. WDYT? Some related jira issues: * http://jira.xwiki.org/jira/browse/XWIKI-1443 * http://jira.xwiki.org/jira/browse/XWIKI-2501 Thanks -Vincent
Vincent Massol wrote:
Hi,
I'd like to discuss about filtering document names when they are created, i.e directly in the XWikiDocument.setFullName()/setName()/ setSpace()/setDatabase() methods.
We could filter out (i.e. remove) the following characters: * pipe: | * greater than: > * brackets: [ and ] * apostrophe: ' * quote: " * colon: : * dot: . * forward slash: /
Any other?
The reason for ., :, |, >, [ and ] is because these are reserved characters in wiki link format.
Another option is to allow some escaping for these chars when writing a wiki link.
Last we need to think about documents in the DB and which already have these chars. Should we write a migrator to filter these chars too? Probably.
WDYT?
Some related jira issues: * http://jira.xwiki.org/jira/browse/XWIKI-1443 * http://jira.xwiki.org/jira/browse/XWIKI-2501
And replace them with what? Simply remove them? The good thing is that the document title can use any character. On the other hand, I'd rather be able to use any character. The best solution would be to escape this kind of characters, but it's too hard. -- Sergiu Dumitriu http://purl.org/net/sergiu/
On Wed, Jun 25, 2008 at 10:59 AM, Sergiu Dumitriu <[email protected]> wrote:
Vincent Massol wrote:
Hi,
I'd like to discuss about filtering document names when they are created, i.e directly in the XWikiDocument.setFullName()/setName()/ setSpace()/setDatabase() methods.
We could filter out (i.e. remove) the following characters: * pipe: | * greater than: > * brackets: [ and ] * apostrophe: ' * quote: " * colon: : * dot: . * forward slash: /
Any other?
The reason for ., :, |, >, [ and ] is because these are reserved characters in wiki link format.
Another option is to allow some escaping for these chars when writing a wiki link.
Last we need to think about documents in the DB and which already have these chars. Should we write a migrator to filter these chars too? Probably.
WDYT?
Some related jira issues: * http://jira.xwiki.org/jira/browse/XWIKI-1443 * http://jira.xwiki.org/jira/browse/XWIKI-2501
And replace them with what? Simply remove them?
The good thing is that the document title can use any character.
On the other hand, I'd rather be able to use any character.
The best solution would be to escape this kind of characters, but it's too hard.
Yes I would prefer to be able to use anything for documents names but escaping can be hard to support. I guess Vincent you are at the best place attach a difficulty level to this with your work on the new rendering/parsing.
-- Sergiu Dumitriu http://purl.org/net/sergiu/ _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
On Jun 25, 2008, at 12:30 PM, Thomas Mortagne wrote:
On Wed, Jun 25, 2008 at 10:59 AM, Sergiu Dumitriu <[email protected]> wrote:
Vincent Massol wrote:
Hi,
I'd like to discuss about filtering document names when they are created, i.e directly in the XWikiDocument.setFullName()/setName()/ setSpace()/setDatabase() methods.
We could filter out (i.e. remove) the following characters: * pipe: | * greater than: > * brackets: [ and ] * apostrophe: ' * quote: " * colon: : * dot: . * forward slash: /
Any other?
The reason for ., :, |, >, [ and ] is because these are reserved characters in wiki link format.
Another option is to allow some escaping for these chars when writing a wiki link.
Last we need to think about documents in the DB and which already have these chars. Should we write a migrator to filter these chars too? Probably.
WDYT?
Some related jira issues: * http://jira.xwiki.org/jira/browse/XWIKI-1443 * http://jira.xwiki.org/jira/browse/XWIKI-2501
And replace them with what? Simply remove them?
The good thing is that the document title can use any character.
On the other hand, I'd rather be able to use any character.
The best solution would be to escape this kind of characters, but it's too hard.
Yes I would prefer to be able to use anything for documents names but escaping can be hard to support.
I'd prefer that too but there are some characters we have not choice other than removing. For example the "/" needs to be removed from a document name as otherwise it'll clash in the URL. Same goes for ? Of course best would be to use an ID for a document but the problem remains the same for the aliases in the URLs to that document.
I guess Vincent you are at the best place attach a difficulty level to this with your work on the new rendering/parsing.
I don't know how this is handled by wikimodel: [Test[Test>Test]]. I'll need to try it. Thanks -Vincent
On Wed, Jun 25, 2008 at 12:56 PM, Vincent Massol <[email protected]> wrote:
On Jun 25, 2008, at 12:30 PM, Thomas Mortagne wrote:
On Wed, Jun 25, 2008 at 10:59 AM, Sergiu Dumitriu <[email protected]> wrote:
Vincent Massol wrote:
Hi,
I'd like to discuss about filtering document names when they are created, i.e directly in the XWikiDocument.setFullName()/setName()/ setSpace()/setDatabase() methods.
We could filter out (i.e. remove) the following characters: * pipe: | * greater than: > * brackets: [ and ] * apostrophe: ' * quote: " * colon: : * dot: . * forward slash: /
Any other?
The reason for ., :, |, >, [ and ] is because these are reserved characters in wiki link format.
Another option is to allow some escaping for these chars when writing a wiki link.
Last we need to think about documents in the DB and which already have these chars. Should we write a migrator to filter these chars too? Probably.
WDYT?
Some related jira issues: * http://jira.xwiki.org/jira/browse/XWIKI-1443 * http://jira.xwiki.org/jira/browse/XWIKI-2501
And replace them with what? Simply remove them?
The good thing is that the document title can use any character.
On the other hand, I'd rather be able to use any character.
The best solution would be to escape this kind of characters, but it's too hard.
Yes I would prefer to be able to use anything for documents names but escaping can be hard to support.
I'd prefer that too but there are some characters we have not choice other than removing. For example the "/" needs to be removed from a document name as otherwise it'll clash in the URL. Same goes for ?
/ can be escaped in %2F, ? in %3F, etc.
Of course best would be to use an ID for a document but the problem remains the same for the aliases in the URLs to that document.
I guess Vincent you are at the best place attach a difficulty level to this with your work on the new rendering/parsing.
I don't know how this is handled by wikimodel: [Test[Test>Test]]. I'll need to try it.
Thanks -Vincent
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
On Jun 25, 2008, at 1:11 PM, Thomas Mortagne wrote:
On Wed, Jun 25, 2008 at 12:56 PM, Vincent Massol <[email protected]> wrote:
On Jun 25, 2008, at 12:30 PM, Thomas Mortagne wrote:
On Wed, Jun 25, 2008 at 10:59 AM, Sergiu Dumitriu <[email protected]> wrote:
Vincent Massol wrote:
Hi,
I'd like to discuss about filtering document names when they are created, i.e directly in the XWikiDocument.setFullName()/ setName()/ setSpace()/setDatabase() methods.
We could filter out (i.e. remove) the following characters: * pipe: | * greater than: > * brackets: [ and ] * apostrophe: ' * quote: " * colon: : * dot: . * forward slash: /
Any other?
The reason for ., :, |, >, [ and ] is because these are reserved characters in wiki link format.
Another option is to allow some escaping for these chars when writing a wiki link.
Last we need to think about documents in the DB and which already have these chars. Should we write a migrator to filter these chars too? Probably.
WDYT?
Some related jira issues: * http://jira.xwiki.org/jira/browse/XWIKI-1443 * http://jira.xwiki.org/jira/browse/XWIKI-2501
And replace them with what? Simply remove them?
The good thing is that the document title can use any character.
On the other hand, I'd rather be able to use any character.
The best solution would be to escape this kind of characters, but it's too hard.
Yes I would prefer to be able to use anything for documents names but escaping can be hard to support.
I'd prefer that too but there are some characters we have not choice other than removing. For example the "/" needs to be removed from a document name as otherwise it'll clash in the URL. Same goes for ?
/ can be escaped in %2F, ? in %3F, etc.
hmmm right, don't know what I was thinking about... -Vincent
Of course best would be to use an ID for a document but the problem remains the same for the aliases in the URLs to that document.
I guess Vincent you are at the best place attach a difficulty level to this with your work on the new rendering/parsing.
I don't know how this is handled by wikimodel: [Test[Test>Test]]. I'll need to try it.
Thanks -Vincent
Vincent Massol wrote:
I'd like to discuss about filtering document names when they are created, i.e directly in the XWikiDocument.setFullName()/setName()/ setSpace()/setDatabase() methods.
We could filter out (i.e. remove) the following characters: * pipe: | * greater than: > * brackets: [ and ] * apostrophe: ' * quote: " * colon: : * dot: . * forward slash: /
Any other?
The reason for ., :, |, >, [ and ] is because these are reserved characters in wiki link format.
Another option is to allow some escaping for these chars when writing a wiki link.
Last we need to think about documents in the DB and which already have these chars. Should we write a migrator to filter these chars too? Probably.
WDYT?
+1 for remove these chars. This makes much problems and I think it doesn't worth effort for escaping chars in hundreds places. At least for now. -- Artem Melentyev
careful: suppressing them may get down to an unreadable format. I'm interested to know what you suggest wrt accented characters. It has caused many problems in i2geo.net and the reason seems to be an incomplete treatment of URL encodings (still can't know where). I still find it'd be great to allow the accented characters to be part of URLs. I am surprised that "." (dot) is proposed to be suppressed and don't know the place in the syntax where it would be a problem. paul
Vincent Massol wrote:
I'd like to discuss about filtering document names when they are created, i.e directly in the XWikiDocument.setFullName()/setName()/ setSpace()/setDatabase() methods.
We could filter out (i.e. remove) the following characters: * pipe: | * greater than: > * brackets: [ and ] * apostrophe: ' * quote: " * colon: : * dot: . * forward slash: /
Any other?
The reason for ., :, |, >, [ and ] is because these are reserved characters in wiki link format.
Another option is to allow some escaping for these chars when writing a wiki link.
Last we need to think about documents in the DB and which already have these chars. Should we write a migrator to filter these chars too? Probably.
WDYT?
+1 for remove these chars. This makes much problems and I think it doesn't worth effort for escaping chars in hundreds places. At least for now. Artem Melentyev _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
On Jun 25, 2008, at 1:39 PM, Paul Libbrecht wrote:
careful: suppressing them may get down to an unreadable format.
I'm interested to know what you suggest wrt accented characters. It has caused many problems in i2geo.net and the reason seems to be an incomplete treatment of URL encodings (still can't know where). I still find it'd be great to allow the accented characters to be part of URLs.
I am surprised that "." (dot) is proposed to be suppressed and don't know the place in the syntax where it would be a problem.
Document names... Format is wiki:Space.Page -Vincent
Vincent Massol wrote:
I'd like to discuss about filtering document names when they are created, i.e directly in the XWikiDocument.setFullName()/setName()/ setSpace()/setDatabase() methods.
We could filter out (i.e. remove) the following characters: * pipe: | * greater than: > * brackets: [ and ] * apostrophe: ' * quote: " * colon: : * dot: . * forward slash: /
Any other?
The reason for ., :, |, >, [ and ] is because these are reserved characters in wiki link format.
Another option is to allow some escaping for these chars when writing a wiki link.
Last we need to think about documents in the DB and which already have these chars. Should we write a migrator to filter these chars too? Probably.
WDYT?
+1 for remove these chars. This makes much problems and I think it doesn't worth effort for escaping chars in hundreds places. At least for now. Artem Melentyev
Paul Libbrecht wrote:
careful: suppressing them may get down to an unreadable format.
I'm interested to know what you suggest wrt accented characters. It has caused many problems in i2geo.net and the reason seems to be an incomplete treatment of URL encodings (still can't know where). I still find it'd be great to allow the accented characters to be part of URLs.
I don't see any problems if UTF8 encoding is used. See http://amelentev.myxwiki.org/xwiki/bin/view/Sandbox/àáâãäåæçèéêë (Is this accents? :))
I am surprised that "." (dot) is proposed to be suppressed and don't know the place in the syntax where it would be a problem.
Yes, dot is most wanted special charter. I think we should remove it as special, when move to some spaces hierarchy (XWIKI-354 or tags or else). -- Artem Melentyev
Le 25-juin-08 à 15:06, Artem Melentyev a écrit :
Paul Libbrecht wrote:
careful: suppressing them may get down to an unreadable format.
I'm interested to know what you suggest wrt accented characters. It has caused many problems in i2geo.net and the reason seems to be an incomplete treatment of URL encodings (still can't know where). I still find it'd be great to allow the accented characters to be part of URLs.
I don't see any problems if UTF8 encoding is used. See http://amelentev.myxwiki.org/xwiki/bin/view/Sandbox/àáâãäåæçèéêë (Is this accents? :))
boy it is. Erm... could you activate the panel to create a page? Maybe that was the one guilty? thanks paul
Paul Libbrecht wrote:
Le 25-juin-08 à 15:06, Artem Melentyev a écrit :
Paul Libbrecht wrote:
careful: suppressing them may get down to an unreadable format.
I'm interested to know what you suggest wrt accented characters. It has caused many problems in i2geo.net and the reason seems to be an incomplete treatment of URL encodings (still can't know where). I still find it'd be great to allow the accented characters to be part of URLs.
I don't see any problems if UTF8 encoding is used. See http://amelentev.myxwiki.org/xwiki/bin/view/Sandbox/àáâãäåæçèéêë (Is this accents? :))
boy it is.
Erm... could you activate the panel to create a page? Maybe that was the one guilty?
activated. All is fine, except in new blog post title is set incorrectly: http://amelentev.myxwiki.org/xwiki/bin/view/Blog/àáâãäåæçèéêë So the problem is GET-parameters are wrongly encoded. Look at http://amelentev.myxwiki.org/xwiki/bin/view/Sandbox/àáâãäåæçèéêë1?param=àáâãäåæçèéêë1 There is jira issue for this: http://jira.xwiki.org/jira/browse/XWIKI-1449 -- Artem Melentyev
Artem Melentyev wrote:
Paul Libbrecht wrote:
Le 25-juin-08 à 15:06, Artem Melentyev a écrit :
Paul Libbrecht wrote:
careful: suppressing them may get down to an unreadable format.
I'm interested to know what you suggest wrt accented characters. It has caused many problems in i2geo.net and the reason seems to be an incomplete treatment of URL encodings (still can't know where). I still find it'd be great to allow the accented characters to be part of URLs. I don't see any problems if UTF8 encoding is used. See http://amelentev.myxwiki.org/xwiki/bin/view/Sandbox/àáâãäåæçèéêë (Is this accents? :)) boy it is.
Erm... could you activate the panel to create a page? Maybe that was the one guilty?
activated. All is fine, except in new blog post title is set incorrectly: http://amelentev.myxwiki.org/xwiki/bin/view/Blog/àáâãäåæçèéêë
So the problem is GET-parameters are wrongly encoded. Look at http://amelentev.myxwiki.org/xwiki/bin/view/Sandbox/àáâãäåæçèéêë1?param=àáâãäåæçèéêë1 There is jira issue for this: http://jira.xwiki.org/jira/browse/XWIKI-1449
Which is fixed now (on myxwiki.org). Read the last comment to see how to fix this in your server. Unfortunately, this is a server error, there's nothing we can do. Parsing the query string by ourselves is too much overkill. -- Sergiu Dumitriu http://purl.org/net/sergiu/
It's fairly easy to work-around but it's a dark hack which would need self-tuning. Below is a little attempt at a snippet. Setting URIEncoding was done i2geo.net but it was still not enough (but XWiki there is very old). paul Le 25-juin-08 à 19:39, Sergiu Dumitriu a écrit :
Unfortunately, this is a server error, there's nothing we can do. Parsing the query string by ourselves is too much overkill.
Paul Libbrecht wrote:
It's fairly easy to work-around but it's a dark hack which would need self-tuning. Below is a little attempt at a snippet.
Didn't receive it...
Setting URIEncoding was done i2geo.net but it was still not enough (but XWiki there is very old).
paul
-- Sergiu Dumitriu http://purl.org/net/sergiu/
participants (5)
-
Artem Melentyev -
Paul Libbrecht -
Sergiu Dumitriu -
Thomas Mortagne -
Vincent Massol