From: Jason Etheridge 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=9652c1fbeff393cf6b2b80bb3bd32fbaec8971ca;p=evergreen%2Fequinox.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 Signed-off-by: Bill Erickson --- 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 ede2749235..d11602d8ac 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,'&').replace(//g,'>'); },