Commit aec26a9c authored by Pedro Eduardo Trujillo's avatar Pedro Eduardo Trujillo
Browse files

Corrige validación de URL

Faltaba por escapar correctamente algunos caracteres, lo que producía
aceptar como URL cadenas de texto que no deberían aceptarse.
Esto afecta a la validación de formularios y al reconocimiento de
valores recibidos en las consultas desde atlas.
parent 0ab2a18a
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -107,9 +107,9 @@ define([
			}

			var protocols = '((https?)|(ftp))',
				textSegment = '\\w-.:@%+~#={}',
				textSegmentPlusParams = textSegment + '?&/',
				regExp = new RegExp('^(' + protocols + ':\/\/)?[' + textSegment + ']{2,256}\.[a-z]{2,6}[' +
				textSegment = '\\w\\-.:@%+~#={}',
				textSegmentPlusParams = textSegment + '?&\\/',
				regExp = new RegExp('^(' + protocols + ':\\/\\/)?[' + textSegment + ']{2,256}\\.[a-z]{2,6}[' +
					textSegmentPlusParams + ']*$');

			if (!regExp.test(value)) {