From: Jason Etheridge <jason@esilibrary.com>
Date: Thu, 15 Dec 2011 15:28:33 +0000 (-0500)
Subject: turn objects (such as null) into empty strings
X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=5729e72def2bf7cc7345d93ef255d28626df0915;p=evergreen%2Fmasslnc.git

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>
---

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;');
     },