From 0d795bfd7691109ef986e6e3922608238c95ae3f Mon Sep 17 00:00:00 2001 From: Jason Etheridge Date: Mon, 19 Dec 2011 15:30:06 -0500 Subject: [PATCH] Receipt editor and %bill_id% This fixes pop-up errors when viewing the bill_payment template in rel_2_1. We're trying to call .replace on a number instead of a string with the sample data provided. I think this should be forward-ported to master as defensive code. Signed-off-by: Jason Etheridge --- Open-ILS/xul/staff_client/chrome/content/util/print.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 d11602d8ac..dc63a48d1a 100644 --- a/Open-ILS/xul/staff_client/chrome/content/util/print.js +++ b/Open-ILS/xul/staff_client/chrome/content/util/print.js @@ -97,7 +97,7 @@ util.print.prototype = { 'escape_html' : function(data) { if (typeof data == 'object') { return ''; } - return data.replace(/&/g,'&').replace(//g,'>'); + return String(data).replace(/&/g,'&').replace(//g,'>'); }, 'simple' : function(msg,params) { -- 2.11.0