From 1115a33a5f6e09b5878f901615896a6828475a8f Mon Sep 17 00:00:00 2001 From: rlx <0x0073@0x2620.org> Date: Wed, 6 Mar 2013 10:00:41 +0000 Subject: [PATCH] Ox.URL: don't treat 7-digit numbers as dates --- source/Ox.UI/js/Core/URL.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/Ox.UI/js/Core/URL.js b/source/Ox.UI/js/Core/URL.js index b5e88d55..826a4d33 100644 --- a/source/Ox.UI/js/Core/URL.js +++ b/source/Ox.UI/js/Core/URL.js @@ -586,10 +586,11 @@ Ox.URL = function(options) { : canBeLocation && length == 4 ? 'location' // leaves us with [-]D[.D][,[-]D[.D]] : canBeDuration ? 'duration' - : canBeDate && !/\./.test(str) ? 'date' + : canBeDate && !/\./.test(str) && !/^\d{7}$/.test(str) ? 'date' : canBeLocation && length == 2 ? 'location' : canBeNumber && /^\d+$/.test(str) ? 'number' : ''; + // !/^\d{7}$/.test(str) avoids matching imdb ids } function parseCondition(str) {