Item12026: JsonRpcContrib: json2 not loaded in IE7

pencil
Priority: Normal
Current State: Closed
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: JsonRpcContrib
Branches: trunk master
Reported By: JanKrueger
Waiting For:
Last Change By: MichaelDaum
The code in JQueryPlugin.pm tries to load json2.js in IE7, using an IE conditional comment. Unfortunately IE7 is rather picky about its syntax and simply ignores the whole thing in its current incarnation. This means that edit features (at the least; I haven't tested everything) are completely unusable in IE7.

Here's a diff to fix it.

diff --git a/lib/Foswiki/Contrib/JsonRpcContrib/JQueryPlugin.pm b/lib/Foswiki/Contrib/JsonRpcContrib/JQueryPlugin.pm
index 97f7dfa..df087a7 100644
--- a/lib/Foswiki/Contrib/JsonRpcContrib/JQueryPlugin.pm
+++ b/lib/Foswiki/Contrib/JsonRpcContrib/JQueryPlugin.pm
@@ -57,7 +57,7 @@ sub init {
   $this->SUPER::init();
 
   my $text =
-"<literal><!-- [if lte IE 7]>\n".
+"<literal><!--[if lte IE 7]>\n".
 $this->renderJS("json2.js").
 "<![endif]--></literal>";

-- JanKrueger - 02 Aug 2012

 
Topic revision: r4 - 23 Sep 2014, MichaelDaum
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy