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

_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to