From ae41ee060447e76a2774ca718ddf91adbac7be4a Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Wed, 28 Oct 2009 15:50:00 +0000 Subject: validate when inlined --- itjs/it.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/itjs/it.js b/itjs/it.js index 44b0e26..63929ec 100644 --- a/itjs/it.js +++ b/itjs/it.js @@ -25,7 +25,7 @@ function ED() var variable = arguments[i]; if (typeof variable == "string") - variable = variable.replace(/&/g, '&').replace(/' + text + ''; + element.innerHTML += '
' + text + '<\/pre>'; } } @@ -58,7 +58,7 @@ function ED() */ function Q(value) { - return typeof value == "undefined" ? "" : value.toString().replace(/&/g, '&').replace(/"/g, '"').replace(//g, '>'); + return typeof value == "undefined" ? "" : value.toString().replace(/&/g, '&').replace(/\"/g, '"').replace(/[<]/g, '<').replace(/>/g, '>'); } /** -- cgit v1.2.3