From 015f5dca18eaaf3f62f4589c29dd1386ba2073e1 Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Fri, 1 May 2015 18:05:44 +0300 Subject: [PATCH] Fixed url regex MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Supported matching http://en.m.wikipedia.org/wiki/… --- app/js/services.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/js/services.js b/app/js/services.js index b3b59f02..2659bbe4 100755 --- a/app/js/services.js +++ b/app/js/services.js @@ -4072,7 +4072,7 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils']) "\\uff66-\\uff9f" + // half width Katakana "\\uffa1-\\uffdc"; // half width Hangul (Korean) - var regexAlphaNumericChars = "0-9\.\_" + regexAlphaChars; + var regexAlphaNumericChars = "0-9\_" + regexAlphaChars; // Based on Regular Expression for URL validation by Diego Perini var urlRegex = "((?:https?|ftp)://|mailto:)?" + @@ -4085,7 +4085,7 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils']) // host name "[" + regexAlphaChars + "0-9][" + regexAlphaChars + "0-9\-]{0,64}" + // domain name - "(?:\\.[" + regexAlphaChars + "0-9][" + regexAlphaChars + "0-9\-]{1,64}){0,10}" + + "(?:\\.[" + regexAlphaChars + "0-9][" + regexAlphaChars + "0-9\-]{0,64}){0,10}" + // TLD identifier "(?:\\.(xn--[0-9a-z]{2,16}|[" + regexAlphaChars + "]{2,24}))" +