From: Jason Etheridge Date: Mon, 19 Dec 2011 20:30:06 +0000 (-0500) Subject: Receipt editor and %bill_id% X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=refs%2Fheads%2Fcollab%2Fphasefx%2Fpayment_template_preview_fix_rel_2_1;p=working%2FEvergreen.git 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 --- 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) {