summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/fields/basic_fields.js
diff options
context:
space:
mode:
authorAaron Bohy <aab@odoo.com>2017-05-23 16:42:46 +0200
committerOlivier Dony <odo@openerp.com>2017-05-23 16:44:17 +0200
commit7154d0769d17f3b7a314c1ca5854622d8922bf87 (patch)
tree33f60031c60719624c58265ba11b474e796dc6c0 /addons/web/static/src/js/fields/basic_fields.js
parente9ea504674458faa68254fe69c7ecb06999e8c5f (diff)
[FIX] web: fix phone widget rendering
Cross-port of odoo/enterprise@135c02cbc52a029e2d72f9159afdd808e8a2c2a2
Diffstat (limited to 'addons/web/static/src/js/fields/basic_fields.js')
-rw-r--r--addons/web/static/src/js/fields/basic_fields.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/addons/web/static/src/js/fields/basic_fields.js b/addons/web/static/src/js/fields/basic_fields.js
index cafa59bbd00..49bcccd2640 100644
--- a/addons/web/static/src/js/fields/basic_fields.js
+++ b/addons/web/static/src/js/fields/basic_fields.js
@@ -886,7 +886,10 @@ var FieldPhone = FieldEmail.extend({
this._super();
if (this._canCall()) {
var text = this.$el.text();
- this.$el.html(text.substr(0, text.length/2) + "&shy;" + text.substr(text.length/2)); // To prevent Skype app to find the phone number
+ // Split phone number into two to prevent Skype app from finding it
+ var part1 = _.escape(text.substr(0, text.length/2));
+ var part2 = _.escape(text.substr(text.length/2));
+ this.$el.html(part1 + "&shy;" + part2);
} else {
this.$el.removeClass('o_form_uri');
}