From: Kai Moritz Date: Thu, 20 Sep 2012 12:42:54 +0000 (+0200) Subject: Fix for two errors, that only appear under IE 8 X-Git-Tag: 0.1.0~14 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=b207a9eb5c1e0a55ee7c319e9d69eb3e95f4ef37;p=openx Fix for two errors, that only appear under IE 8 * The Internet-Explorer stumbles, when feeded with JavaScript-code that includes the leading "" does not have to be filtered, because it is a valid JavaScript-comment. * A global variable "OA_output" is defined, because IE 8 would complain loudly otherwise. --- diff --git a/openx.js b/openx.js index 92c25bc..94a3bb4 100644 --- a/openx.js +++ b/openx.js @@ -96,6 +96,11 @@ result = /src\s*=\s*['"]([^'"]*)['"]/i.exec(src); if (result == null) { /** script-tag with inline-code: execute inline-code! */ + result = /^\s*<.*$/m.exec(inline); + if (result != null) { + /** Remove leading HTML-comments, because IE will stumble otherwise */ + inline = inline.slice(result[0].length,inline.length); + } $.globalEval(inline); } else { @@ -128,3 +133,5 @@ } } ( window.openx = window.openx || {}, jQuery )); + +var OA_output = {}; // << Needed, because IE will complain loudly otherwise!