From b207a9eb5c1e0a55ee7c319e9d69eb3e95f4ef37 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Thu, 20 Sep 2012 14:42:54 +0200 Subject: [PATCH] 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. --- openx.js | 7 +++++++ 1 file changed, 7 insertions(+) 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! -- 2.20.1