X-Git-Url: http://git.euphorik.ch/?p=euphorik.git;a=blobdiff_plain;f=js%2Fformateur.js;h=eba6c5a3aa089e2de737e72ae1b9d8bb479aa555;hp=4b74d44a1c5b50c4d404cfbdd183ff46ceec5545;hb=8ee1535f5594573931ddaebee77bf6148a5358cb;hpb=1eaef253e3c3436668379409472d27d45b7fd2b6 diff --git a/js/formateur.js b/js/formateur.js index 4b74d44..eba6c5a 100644 --- a/js/formateur.js +++ b/js/formateur.js @@ -28,7 +28,7 @@ euphorik.Formateur = function() { this.regexUrl = new RegExp("(?:(?:" + this.protocoles + ")://|www\\.)[^ ]*", "gi"); this.regexImg = new RegExp("^.*?\\.(gif|jpg|png|jpeg|bmp|tiff)$", "i"); - this.regexDomaine = new RegExp("^(?:(?:" + this.protocoles + ")://|www\\.).*?([^/.]+\\.[^/.]+)(?:$|/).*$", "i"); + this.regexDomaine = new RegExp("^(?:(?:" + this.protocoles + ")://)(.*?)(?:$|/).*$", "i"); this.regexTestProtocoleExiste = new RegExp("^(?:" + this.protocoles + ")://.*$", "i"); this.regexNomProtocole = new RegExp("^(.*?)://"); }; @@ -124,7 +124,7 @@ euphorik.Formateur.prototype.traiterWikiSyntaxe = function(m) { /** * Renvoie une version courte de l'url. - * par exemple : http://en.wikipedia.org/wiki/Yakov_Smirnoff devient wikipedia.org + * par exemple : http://en.wikipedia.org/wiki/Yakov_Smirnoff devient en.wikipedia.org */ euphorik.Formateur.prototype.getShort = function(url) { var estUneImage = false;