[open-ils-commits] [GIT] Evergreen ILS branch master updated. 1c5edfe9546ab79685f1024e3b3e924ab75fecda

Evergreen Git git at git.evergreen-ils.org
Fri Jul 12 15:48:29 EDT 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  1c5edfe9546ab79685f1024e3b3e924ab75fecda (commit)
      from  73f71659fa2d1dd6bcbc726cd24d9563e9df52d4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 1c5edfe9546ab79685f1024e3b3e924ab75fecda
Author: Pasi Kallinen <pasi.kallinen at pttk.fi>
Date:   Thu Jun 27 11:23:11 2013 +0300

    Add missing character set definitions to data URIs.
    Also use encodeURIComponent() instead of escape() so the UTF-8 characters stay intact.
    Also, fix the print macro help popup window size.
    
    Signed-off-by: Pasi Kallinen <pasi.kallinen at pttk.fi>
    Signed-off-by: Jason Etheridge <jason at esilibrary.com>

diff --git a/Open-ILS/web/opac/common/js/utils.js b/Open-ILS/web/opac/common/js/utils.js
index 3d1366e..dae8ef2 100644
--- a/Open-ILS/web/opac/common/js/utils.js
+++ b/Open-ILS/web/opac/common/js/utils.js
@@ -555,11 +555,11 @@ function interval_to_seconds( $interval ) {
 
 function openWindow( data ) {
 	if( isXUL() ) {
-		var data = window.escape(
+		var data = window.encodeURIComponent(
 			'<html><head><title></title></head><body>' + data + '</body></html>');
 
 		xulG.window_open(
-			'data:text/html,' + data,
+			'data:text/html;charset=UTF-8,' + data,
 			'', 
 			'chrome,resizable,width=700,height=500'); 
 
diff --git a/Open-ILS/xul/staff_client/chrome/content/auth/controller.js b/Open-ILS/xul/staff_client/chrome/content/auth/controller.js
index 11b9e1a..bbd1979 100644
--- a/Open-ILS/xul/staff_client/chrome/content/auth/controller.js
+++ b/Open-ILS/xul/staff_client/chrome/content/auth/controller.js
@@ -395,7 +395,7 @@ auth.controller.prototype = {
                 try {
                     if (x.readyState != 4) return;
                     if (x.status == 200) {
-                        window.open('data:text/html,'+window.escape(x.responseText),'upgrade','chrome,resizable,modal,centered');
+                        window.open('data:text/html;charset=UTF-8,'+window.encodeURIComponent(x.responseText),'upgrade','chrome,resizable,modal,centered');
                     } else {
                         if(typeof(G.upgradeCheck) == "function")
                         {
diff --git a/Open-ILS/xul/staff_client/chrome/content/util/error.js b/Open-ILS/xul/staff_client/chrome/content/util/error.js
index f30605a..a865349 100644
--- a/Open-ILS/xul/staff_client/chrome/content/util/error.js
+++ b/Open-ILS/xul/staff_client/chrome/content/util/error.js
@@ -317,7 +317,7 @@ util.error.prototype = {
         if (r == 1) {
             JSAN.use('util.window'); var win = new util.window();
             win.open(
-                'data:text/plain,' + window.escape( 'Please open a helpdesk ticket and include the following text: \n\n' + (new Date()) + '\n\n' + msg + '\n\n' + obj.pretty_print(js2JSON(E)) ),
+                'data:text/plain;charset=UTF-8,' + window.encodeURIComponent( 'Please open a helpdesk ticket and include the following text: \n\n' + (new Date()) + '\n\n' + msg + '\n\n' + obj.pretty_print(js2JSON(E)) ),
                 'error_alert',
                 'chrome,resizable,width=700,height=500'
             );
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 30e0ba7..075b0c1 100644
--- a/Open-ILS/xul/staff_client/chrome/content/util/print.js
+++ b/Open-ILS/xul/staff_client/chrome/content/util/print.js
@@ -194,7 +194,7 @@ util.print.prototype = {
                     });
                 break;
                 default:
-                    w = obj.win.open('data:' + content_type + ',' + window.escape(msg),'receipt_temp','chrome,resizable');
+                    w = obj.win.open('data:' + content_type + ',' + window.encodeURIComponent(msg),'receipt_temp','chrome,resizable');
                     w.minimize();
                     setTimeout(
                         function() {
@@ -519,9 +519,9 @@ util.print.prototype = {
                             }
                         } else {
                             if (params.content_type == 'text/plain') {
-                                w = window.open('data:text/plain,'+escape(params.msg),'','chrome');
+                                w = window.open('data:text/plain;charset=UTF-8,'+encodeURIComponent(params.msg),'','chrome');
                             } else {
-                                w = window.open('data:text/html,'+escape(params.msg),'','chrome');
+                                w = window.open('data:text/html;charset=UTF-8,'+encodeURIComponent(params.msg),'','chrome');
                             }
                             setTimeout(
                                 function() {
@@ -544,9 +544,9 @@ util.print.prototype = {
                             obj._NSPrint_webBrowserPrint(w,silent,params);
                         } else {
                             if (params.content_type == 'text/plain') {
-                                w = window.open('data:text/plain,'+escape(params.msg),'','chrome');
+                                w = window.open('data:text/plain;charset=UTF-8,'+encodeURIComponent(params.msg),'','chrome');
                             } else {
-                                w = window.open('data:text/html,'+escape(params.msg),'','chrome');
+                                w = window.open('data:text/html;charset=UTF-8,'+encodeURIComponent(params.msg),'','chrome');
                             }
                             setTimeout(
                                 function() {
diff --git a/Open-ILS/xul/staff_client/server/admin/offline_manage_xacts.js b/Open-ILS/xul/staff_client/server/admin/offline_manage_xacts.js
index 5531527..d5f36ef 100644
--- a/Open-ILS/xul/staff_client/server/admin/offline_manage_xacts.js
+++ b/Open-ILS/xul/staff_client/server/admin/offline_manage_xacts.js
@@ -879,7 +879,7 @@ admin.offline_manage_xacts.prototype = {
             for (var i = 0; i < obj.sel_errors.length; i++) {
                 var error = obj.errors[ obj.sel_errors[i] ];
                 win.open(
-                    'data:text/plain,' + window.escape(
+                    'data:text/plain;charset=UTF-8,' + window.encodeURIComponent(
                         'Details:\n' + obj.error.pretty_print(js2JSON(error))
                     ),
                     'offline_error_details',
diff --git a/Open-ILS/xul/staff_client/server/cat/marc_view.xul b/Open-ILS/xul/staff_client/server/cat/marc_view.xul
index 90b42e8..e600a49 100644
--- a/Open-ILS/xul/staff_client/server/cat/marc_view.xul
+++ b/Open-ILS/xul/staff_client/server/cat/marc_view.xul
@@ -57,12 +57,12 @@ vim:noet:sw=4:ts=4:
                         function(req) {
                             var marc_html = req.getResultObject();
                             if (noprint||typeof xulG == 'undefined') marc_html = marc_html.replace(/<button.+?button>/, '');
-                            document.getElementById('marc_frame').setAttribute('src', 'data:text/html,' + encodeURIComponent(marc_html));
+                            document.getElementById('marc_frame').setAttribute('src', 'data:text/html;charset=UTF-8,' + encodeURIComponent(marc_html));
                         }
                     );
                 } else {
                     var marc_html = '<h1>' + document.getElementById('catStrings').getString('bib.no_marc') + '</h1>';
-                    document.getElementById('marc_frame').setAttribute('src', 'data:text/html,' + marc_html);
+                    document.getElementById('marc_frame').setAttribute('src', 'data:text/html;charset=UTF-8,' + marc_html);
                 }
 
             } catch(E) {
diff --git a/Open-ILS/xul/staff_client/server/circ/print_list_template_editor.js b/Open-ILS/xul/staff_client/server/circ/print_list_template_editor.js
index dab6e2b..c846172 100644
--- a/Open-ILS/xul/staff_client/server/circ/print_list_template_editor.js
+++ b/Open-ILS/xul/staff_client/server/circ/print_list_template_editor.js
@@ -254,9 +254,9 @@ circ.print_list_template_editor.prototype = {
                                     var macro_string = macros.join(', ');
                                     JSAN.use('util.window');
                                     var win = new util.window();
-                                    win.open('data:text/html,'
-                                        + window.escape(
-                                            '<html style="width: 600; height: 400;">'
+                                    win.open('data:text/html;charset=UTF-8,'
+                                        + window.encodeURIComponent(
+                                            '<html>'
                                             + '<head><title>' 
                                             + document.getElementById('circStrings').getString('staff.circ.print_list_template.window.title')
                                             + '</title></head>'
@@ -281,7 +281,7 @@ circ.print_list_template_editor.prototype = {
                                             + document.getElementById('circStrings').getString('staff.circ.print_list_template.window.close')
                                             + '</button>'
                                             + '</body></html>'
-                                        ), 'title', 'chrome,resizable');
+                                        ), 'title', 'width=600,height=400,chrome,resizable');
                                 } catch(E) {
                                     alert(E);
                                 }
diff --git a/Open-ILS/xul/staff_client/server/patron/display.js b/Open-ILS/xul/staff_client/server/patron/display.js
index 4728790..dab77bf 100644
--- a/Open-ILS/xul/staff_client/server/patron/display.js
+++ b/Open-ILS/xul/staff_client/server/patron/display.js
@@ -413,9 +413,9 @@ patron.display.prototype = {
                         ['command'],
                         function(ev) {
                             if (obj.msg_url) {
-                                obj.right_deck.set_iframe('data:text/html,'+obj.msg_url,{},{});
+                                obj.right_deck.set_iframe('data:text/html;charset=UTF-8,'+obj.msg_url,{},{});
                             } else {
-                                obj.right_deck.set_iframe('data:text/html,<h1>' + $("patronStrings").getString('staff.patron.display.no_alerts_or_messages') + '</h1>',{},{});
+                                obj.right_deck.set_iframe('data:text/html;charset=UTF-8,<h1>' + $("patronStrings").getString('staff.patron.display.no_alerts_or_messages') + '</h1>',{},{});
                             }
                         }
                     ],
@@ -1047,10 +1047,10 @@ patron.display.prototype = {
                     if (msg != obj.old_msg) {
                         //obj.error.yns_alert(msg,'Alert Message','OK',null,null,'Check here to confirm this message.');
                         document.documentElement.firstChild.focus();
-                        var data_url = window.escape("<img src='" + xulG.url_prefix('/xul/server/skin/media/images/stop_sign.png') + "'/>" + '<h1>'
+                        var data_url = window.encodeURIComponent("<img src='" + xulG.url_prefix('/xul/server/skin/media/images/stop_sign.png') + "'/>" + '<h1>'
                             + $("patronStrings").getString('staff.patron.display.init.network_request.window_title') + '</h1><blockquote><p>' + msg + '</p>\r\n\r\n<pre>'
                             + $("patronStrings").getString('staff.patron.display.init.network_request.window_message') + '</pre></blockquote>');
-                        obj.right_deck.set_iframe('data:text/html,'+data_url,{},{});
+                        obj.right_deck.set_iframe('data:text/html;charset=UTF-8,'+data_url,{},{});
                         obj.old_msg = msg;
                         obj.msg_url = data_url;
                     } else {

-----------------------------------------------------------------------

Summary of changes:
 Open-ILS/web/opac/common/js/utils.js               |    4 ++--
 .../staff_client/chrome/content/auth/controller.js |    2 +-
 .../xul/staff_client/chrome/content/util/error.js  |    2 +-
 .../xul/staff_client/chrome/content/util/print.js  |   10 +++++-----
 .../server/admin/offline_manage_xacts.js           |    2 +-
 Open-ILS/xul/staff_client/server/cat/marc_view.xul |    4 ++--
 .../server/circ/print_list_template_editor.js      |    8 ++++----
 Open-ILS/xul/staff_client/server/patron/display.js |    8 ++++----
 8 files changed, 20 insertions(+), 20 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list