summaryrefslogtreecommitdiff
path: root/itjs
diff options
context:
space:
mode:
authorUrban Müller2009-10-28 15:50:00 +0000
committerUrban Müller2009-10-28 15:50:00 +0000
commitae41ee060447e76a2774ca718ddf91adbac7be4a (patch)
tree6f5975d14e85b79b678b6e58fc918aa94098a78e /itjs
parent2c4a1a48238c525b9dd6b18710c44b318707649f (diff)
downloaditools-ae41ee060447e76a2774ca718ddf91adbac7be4a.tar.gz
itools-ae41ee060447e76a2774ca718ddf91adbac7be4a.tar.bz2
itools-ae41ee060447e76a2774ca718ddf91adbac7be4a.zip
validate when inlined
Diffstat (limited to 'itjs')
-rw-r--r--itjs/it.js6
1 files 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, '&amp;').replace(/</g, '&lt;');
+ variable = variable.replace(/&/g, '&amp;').replace(/[<]/g, '&lt;');
text += (typeof variable) + " " + variable;
@@ -48,7 +48,7 @@ function ED()
text += "\n";
}
- element.innerHTML += '<pre style="background-color:#FEE; margin:0">' + text + '</pre>';
+ element.innerHTML += '<pre style="background-color:#FEE; margin:0">' + text + '<\/pre>';
}
}
@@ -58,7 +58,7 @@ function ED()
*/
function Q(value)
{
- return typeof value == "undefined" ? "" : value.toString().replace(/&/g, '&amp;').replace(/"/g, '&quot;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
+ return typeof value == "undefined" ? "" : value.toString().replace(/&/g, '&amp;').replace(/\"/g, '&quot;').replace(/[<]/g, '&lt;').replace(/>/g, '&gt;');
}
/**