From d39b643844af5c14138580e4100d982adac54d16 Mon Sep 17 00:00:00 2001 From: Jeena Paradies Date: Thu, 22 Nov 2012 11:34:26 +0100 Subject: [PATCH] fixed problem where links wouldn't be clickable --- WebKit/scripts/main.js | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/WebKit/scripts/main.js b/WebKit/scripts/main.js index c4d285c..daa16cd 100644 --- a/WebKit/scripts/main.js +++ b/WebKit/scripts/main.js @@ -55,20 +55,17 @@ String.prototype.endsWith = function(suffix) { return this.match(suffix+"$") == suffix; }; -var entityMap = { - "&": "&", - "<": "<", - ">": ">", - '"': '"', - "'": ''', - "/": '/' -}; + var __entityMap = { + "&": "&", + "<": "<", + ">": ">" + }; -String.prototype.escapeHTML = function() { - return String(this).replace(/[&<>"'\/]/g, function (s) { - return entityMap[s]; - }); -} + String.prototype.escapeHTML = function() { + return String(this).replace(/[&<>]/g, function (s) { + return __entityMap[s]; + }); + } var console = { log: function(s) { @@ -108,11 +105,18 @@ var console = { } }; -function loadPlugin(url) { +function loadPlugin(js_url, css_url) { + if (js_url) { + + } var plugin = document.createElement("script"); plugin.type = "text/javascript"; - plugin.src = url; + plugin.src = js_url; document.getElementsByTagName("head")[0].appendChild(plugin); + + if (css_url != null) { + + } } function debug(string) {