From a8efeffbf22bcff497a7ffb9eada545510bac2cd Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Wed, 8 Mar 2017 18:00:22 +0100 Subject: [PATCH] [FIX] pos_mercury: support for Inernet Explorer / Edge In the method `xml_node_to_string` in `qweb2.js`, which is used when extending XML templates, such as this extend of the template `PaymentScreen-Paymentlines` the method `(new XMLSerializer()).serializeToString(node)` magically escapes the double quotes `"` in Internet Explorer and Edge, while this is not the case in other browsers, therefore converting, for instance, `this.removeAttr("class");` to `this.removeAttr("e;class"e;);` whhich made the rendering of the template fails. As this method is quite critical, we do not dare editing it to use an alternative to `XMLSerializer.serializeToString` in a stable release Instead, as a workaround, we just avoid the use of the double quotes. opw-708296 --- addons/pos_mercury/static/src/xml/pos_mercury.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/pos_mercury/static/src/xml/pos_mercury.xml b/addons/pos_mercury/static/src/xml/pos_mercury.xml index 02f25588a3c..acf830e2543 100644 --- a/addons/pos_mercury/static/src/xml/pos_mercury.xml +++ b/addons/pos_mercury/static/src/xml/pos_mercury.xml @@ -25,16 +25,16 @@ - this.removeAttr("class"); - this.attr('t-attf-class', 'paymentline selected #{line.mercury_swipe_pending ? "o_pos_mercury_swipe_pending" : ""}'); + this.removeAttr('class'); + this.attr('t-attf-class', 'paymentline selected #{line.mercury_swipe_pending ? \'o_pos_mercury_swipe_pending\' : \'\'}'); - this.removeAttr("class"); - this.attr('t-attf-class', 'paymentline #{line.mercury_swipe_pending ? "o_pos_mercury_swipe_pending" : ""}'); + this.removeAttr('class'); + this.attr('t-attf-class', 'paymentline #{line.mercury_swipe_pending ? \'o_pos_mercury_swipe_pending\' : \'\'}'); - this.removeAttr("class"); - this.attr('t-attf-class', 'col-tendered edit #{line.mercury_swipe_pending ? "o_pos_mercury_swipe_pending" : ""}'); + this.removeAttr('class'); + this.attr('t-attf-class', 'col-tendered edit #{line.mercury_swipe_pending ? \'o_pos_mercury_swipe_pending\' : \'\'}');