From ee6f74edc604824b08ca60e5fd782af9a69c4443 Mon Sep 17 00:00:00 2001 From: Joey Schulze Date: Mon, 21 Sep 2015 12:47:49 +0200 Subject: [PATCH 1/1] Special XML conversion code for Firefox >= 20.0 This patch is required due to changed behaviour of the XML parser in XmlHttpRequest that parses XML responses from the AJAX/SQL backend. Firefox < 20.0 was parsed and returned as Firefox >= 20.0 is parsed and returned as <bla> This breaks Icons and other HTML code in Rico.LiveGrid cells Addendum: Chrome alias WebKit seems to behave like Firefox >= 20.0 as well --- minsrc/rico.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/minsrc/rico.js b/minsrc/rico.js index 55287bf..9c8e0ef 100644 --- a/minsrc/rico.js +++ b/minsrc/rico.js @@ -184,7 +184,13 @@ Rico.getContentAsString=function( parentNode, isEncoded ) { }; Rico._getEncodedContent=function(parentNode) { - if (parentNode.innerHTML) return parentNode.innerHTML; + if (parentNode.innerHTML) { + if (Rico.isGecko && navigator.productSub >= "20100101") + parentNode.innerHTML.replace(/</g,'<').replace(/>/g,'>').replace(/&/g,'&'); + else + return parentNode.innerHTML; + } + switch (parentNode.childNodes.length) { case 0: return ""; case 1: return parentNode.firstChild.nodeValue; -- 2.20.1