summaryrefslogtreecommitdiff
path: root/itjs
diff options
context:
space:
mode:
authorKoni Weber2007-09-25 15:31:20 +0000
committerKoni Weber2007-09-25 15:31:20 +0000
commit262fc0bf62ff89f2c9be8f39be8e96adb90b2948 (patch)
tree5ae5c51efcc51f47f22250a00370ab15d27ea4f1 /itjs
parentbe9859eb1b53a501615a99afe66c330977be9140 (diff)
downloaditools-262fc0bf62ff89f2c9be8f39be8e96adb90b2948.tar.gz
itools-262fc0bf62ff89f2c9be8f39be8e96adb90b2948.tar.bz2
itools-262fc0bf62ff89f2c9be8f39be8e96adb90b2948.zip
Q() does not fail on quoting undefined values (same behaviour as php)
Diffstat (limited to 'itjs')
-rw-r--r--itjs/it.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/itjs/it.js b/itjs/it.js
index 4daf2c0..a43ba3a 100644
--- a/itjs/it.js
+++ b/itjs/it.js
@@ -58,7 +58,7 @@ function ED()
*/
function Q(value)
{
- return 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;');
}
/**