On Tue, Nov 18, 2008 at 1:21 PM, Vincent Massol <[email protected]> wrote:
On Nov 18, 2008, at 1:03 PM, Vincent Massol wrote:
[snip]
> WDYT? We should not try to let through every URL, but just a few we are sure are working: http, https, ftp, mailto. For the others, there's always copy/paste.
I don't quite agree.
I should be able to enter a skype URL for example and since you can register any type of URL in your browser we can't filter them.
What we could do though is test for the URL validity and if not valid then don't consider the element as a link. That is not very easy to implement but possible. I'm not sure I prefer this over displaying an inline error.
Well, this time the user didn't do anything wrong.
I don't agree. He did not follow the defined wiki syntax so he did something wrong and we need to tell him/her.
It just happened that the document contained an italic text after ':'. He will see the error and think that XWiki is faulty, not that he did something wrong. I certainly wouldn't like to receive such an error after importing a "simple" document.
The import is a different matter. I was talking about the wiki syntax here. For the import I don't understand since you'll never get a link if you the original document didn't have a <a href=""> element so this can't happen since it'll be considered as text.
Ok I understand now. It's imported as text and saved in wiki syntax as normal text. When rendered later in XHTML it's parsed again and then this time considered an inline element and rendered accordingly.
So the real solution is that the XHTML parser should either generate a verbatim block event or simply escape the ":" with "\:".
I'll add a unit test for this to see how it goes.
Actually this is working fine. Here's the test:
.#------------------------------------------------------------------------------------------- .input|xhtml/1.0
.#------------------------------------------------------------------------------------------- <html>something://whatever</html> .#----------------------------------------------------- .expect|event .#----------------------------------------------------- beginDocument beginParagraph onWord [something] onSpecialSymbol [:] onEscape [/] onEscape [/] onWord [whatever] endParagraph endDocument .#----------------------------------------------------- .expect|xwiki .#----------------------------------------------------- something:~/~/whatever
So I don't know what's wrong. Asiri could you dig?
Maybe we should ask Guillaume whether he entered this manually after the import? :)
Nope, I didn't touch the file, I simply selected it in my file browser and uploaded it as is. I didn't do anything special afterwards, I simply tried to access the page where it was imported. Guillaume
Thanks -Vincent _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Guillaume Lerouge Product Manager - XWiki Skype ID : wikibc http://blog.xwiki.com/