From e8469227f6deea2d7398adaabffd0cf1213cd941 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 24 Jan 2016 08:38:33 +0000 Subject: [PATCH] remove everything but numbers and plus from links on telephon numbers, as telephone software might not like it --- etemplate/js/et2_widget_url.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/etemplate/js/et2_widget_url.js b/etemplate/js/et2_widget_url.js index eb0f1d6576..1a2d60acd7 100644 --- a/etemplate/js/et2_widget_url.js +++ b/etemplate/js/et2_widget_url.js @@ -154,6 +154,8 @@ var et2_url = et2_textbox.extend( value = value.replace('♥','').replace('(0)',''); value = value.replace(/[abc]/gi,2).replace(/[def]/gi,3).replace(/[ghi]/gi,4).replace(/[jkl]/gi,5).replace(/[mno]/gi,6); value = value.replace(/[pqrs]/gi,7).replace(/[tuv]/gi,8).replace(/[wxyz]/gi,9); + // remove everything but numbers and plus, as telephon software might not like it + value = value.replace(/[^0-9+]/g, ''); // movile Webkit (iPhone, Android) have precedence over server configuration! if (navigator.userAgent.indexOf('AppleWebKit') !== -1 &&