From 5729e72def2bf7cc7345d93ef255d28626df0915 Mon Sep 17 00:00:00 2001
From: Jason Etheridge <jason@esilibrary.com>
Date: Thu, 15 Dec 2011 10:28:33 -0500
Subject: [PATCH] turn objects (such as null) into empty strings

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 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Open-ILS/xul/staff_client/chrome/content/util/print.js b/Open-ILS/xul/staff_client/chrome/content/util/print.js
index 49fa358a84..b64d207e87 100644
--- a/Open-ILS/xul/staff_client/chrome/content/util/print.js
+++ b/Open-ILS/xul/staff_client/chrome/content/util/print.js
@@ -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;');
     },
 
-- 
2.11.0