turn objects (such as null) into empty strings
authorJason Etheridge <jason@esilibrary.com>
Thu, 15 Dec 2011 15:28:33 +0000 (10:28 -0500)
committerBill Erickson <berick@esilibrary.com>
Fri, 16 Dec 2011 19:08:41 +0000 (14:08 -0500)
when they're being treated as strings (with escape_html) during printing

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/xul/staff_client/chrome/content/util/print.js

index 49fa358..b64d207 100644 (file)
@@ -96,6 +96,7 @@ util.print.prototype = {
     },
 
     'escape_html' : function(data) {
+        if (typeof data == 'object') { return ''; }
         return data.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;');
     },