From 67f67b512477d7c87e47076468f7dadb144e1da8 Mon Sep 17 00:00:00 2001 From: true-datura Date: Wed, 7 Mar 2018 17:55:23 +0200 Subject: [FIX] web: 'image_small' field not displayed for non-latin translations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before this commit, images in kanban view of the Contact app were not displayed on non-latin languages, such as Russian. This was caused by the is_bin_size helper that wrongly assumes that a certain string is not a binary size, although it is (e.g. 64.2 Кб). This commit fixes the issue by including such strings as valid binary sizes. Bug found and fixed by @true-datura Test by @alexkuhn closes #23526 closes #22519 --- addons/web/static/src/js/core/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/web/static/src/js/core/utils.js') diff --git a/addons/web/static/src/js/core/utils.js b/addons/web/static/src/js/core/utils.js index 496754aedea..99240870c18 100644 --- a/addons/web/static/src/js/core/utils.js +++ b/addons/web/static/src/js/core/utils.js @@ -228,7 +228,7 @@ var utils = { * @returns {boolean} */ is_bin_size: function (v) { - return (/^\d+(\.\d*)? \w+$/).test(v); + return (/^\d+(\.\d*)? [^0-9]+$/).test(v); }, /** * @param {any} node -- cgit v1.2.3