Don't escape_html numbers in util/print.js
authorThomas Berezansky <tsbere@mvlc.org>
Fri, 12 Aug 2011 19:47:25 +0000 (15:47 -0400)
committerJason Etheridge <jason@esilibrary.com>
Fri, 12 Aug 2011 20:44:41 +0000 (16:44 -0400)
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Open-ILS/xul/staff_client/chrome/content/util/print.js

index 068eab0..5c24b03 100644 (file)
@@ -301,7 +301,7 @@ util.print.prototype = {
                     for (var i in params.data) {
                         var re = new RegExp('%'+i+'%',"g");
                         if (typeof params.data[i] == 'string' || typeof params.data[i] == 'number') {
-                            try{b = s; s=s.replace(re, this.escape_html(params.data[i]));}
+                            try{b = s; s=s.replace(re, (typeof params.data[i] == 'string' ? this.escape_html(params.data[i]) : params.data[i]));}
                                 catch(E){s = b; this.error.standard_unexpected_error_alert('print.js, template_sub(): 3 string = <' + s + '>',E);}
                         } else {
                             /* likely a null, print as an empty string */