I think Vincent is right: since this kind of error will probably not happen
that often, therefore displaying a visual error in the document while
rendering correctly all the remaining text should be ok.
Guillaume
On Tue, Nov 18, 2008 at 9:05 AM, Vincent Massol <vincent(a)massol.net> wrote:
Hi,
On Nov 18, 2008, at 6:04 AM, Asiri Rathnayake wrote:
Hi Guillaume,
On Mon, Nov 17, 2008 at 7:55 PM, Guillaume Lerouge <guillaume(a)xwiki.com
wrote:
Hi Asiri,
I just tested it and got an exception:
http://91.121.237.216/xwiki/bin/view/Test/WikiDeveloppeurs
I can send you the original file if you wish. Could the exception be
related
to the presence of bulleted lists in the original document? I
checked the
JIRA issue related to lists but it didn't seem to be the same one.
It's the following content that is causing the exception to be
thrown :
Par exemple:*#if($context.user == «XWiki.Admin»)Vous êtes
l'administrateur
par défaut de ce wiki!#else Vous êtes un utilisateur classique.#end*
[snip]
The issue here is that the rendering mechanism
thinks
"exemple://#if($context.user
...." is a url and tries to parse it...
I think this is something that has to be handled in the rendering
module.
We'll wait for vincent's opinion on this.
First, a comment:
* I'm currently working on error handling and this error will be
reported inline with an ErrorBlock and thus with a visual error where
it happened in the very near future.
The format for an inline link is (scheme):(something)
However for URIs, only some are considered valid: mailto, image, attach
For URL (i.e of the form (scheme)://(something) there's no check
currently and all are considered URLs and checked to be valid.
The reason we don't check for validity is because there can be any
number of valid URL schemes (for example skype:// is a valid scheme if
you've registered skype URL in your browser).
I don't see any solution for this except not allowing inline links but
I'm not sure this is a good solution.
I think the inline error handling is the best solution and the user
will use {{{exemple://#if($context.user..}}} if we really wants to
enter this text.
WDYT?
Thanks
-Vincent
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users