From 686c3455dd6acc6067f4f2517fe5135d0d8ae403 Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Thu, 19 Mar 2015 17:28:02 +0300 Subject: [PATCH] Improved URL regex --- app/js/services.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/js/services.js b/app/js/services.js index 88a36522..8e09910e 100755 --- a/app/js/services.js +++ b/app/js/services.js @@ -3776,11 +3776,11 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils']) "(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])(?:\\.(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])){3}" + "|" + // host name - "(?:(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)" + + "(?:(?:[a-z\\u00a1-\\uffff0-9]-*)*[" + regexAlphaChars + "0-9]+)" + // domain name - "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*" + + "(?:\\.(?:[" + regexAlphaChars + "]-*)*[" + regexAlphaChars + "0-9]+)*" + // TLD identifier - "(?:\\.(xn--[0-9a-z]{2,16}|[a-z\\u00a1-\\uffff]{2,24}))" + + "(?:\\.(xn--[0-9a-z]{2,16}|[" + regexAlphaChars + "]{2,24}))" + ")" + // port number "(?::\\d{2,5})?" +