diff --git a/VERSION b/VERSION index 3593e193..0ec4219c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.00.0 (2012-05-28 13:13:43) dev +Version 2.00.0 (2012-05-28 13:23:14) dev diff --git a/applications/admin/static/js/ajax_editor.js b/applications/admin/static/js/ajax_editor.js index dbb2be73..f846376b 100644 --- a/applications/admin/static/js/ajax_editor.js +++ b/applications/admin/static/js/ajax_editor.js @@ -71,7 +71,7 @@ function doClickSave() { success: function(json,text,xhr){ // show flash message (if any) - var flash=xhr.getResponseHeader('web2py-component-flash'); + var flash=decodeURIComponent(xhr.getResponseHeader('web2py-component-flash')); if (flash) jQuery('.flash').html(flash).slideDown(); else jQuery('.flash').hide(); @@ -149,7 +149,7 @@ function doToggleBreakpoint(filename, url) { success: function(json,text,xhr){ // show flash message (if any) - var flash=xhr.getResponseHeader('web2py-component-flash'); + var flash=decodeURIComponent(xhr.getResponseHeader('web2py-component-flash')); if (flash) jQuery('.flash').html(flash).slideDown(); else jQuery('.flash').hide(); try { diff --git a/applications/admin/static/js/web2py.js b/applications/admin/static/js/web2py.js index 6a84c20a..b2f7e8dd 100644 --- a/applications/admin/static/js/web2py.js +++ b/applications/admin/static/js/web2py.js @@ -86,7 +86,7 @@ function web2py_ajax_page(method, action, data, target) { var html=xhr.responseText; var content=xhr.getResponseHeader('web2py-component-content'); var command=xhr.getResponseHeader('web2py-component-command'); - var flash=xhr.getResponseHeader('web2py-component-flash'); + var flash=decodeURIComponent(xhr.getResponseHeader('web2py-component-flash')); var t = jQuery('#'+target); if(content=='prepend') t.prepend(html); else if(content=='append') t.append(html); diff --git a/applications/examples/static/js/web2py.js b/applications/examples/static/js/web2py.js index 6a84c20a..b2f7e8dd 100644 --- a/applications/examples/static/js/web2py.js +++ b/applications/examples/static/js/web2py.js @@ -86,7 +86,7 @@ function web2py_ajax_page(method, action, data, target) { var html=xhr.responseText; var content=xhr.getResponseHeader('web2py-component-content'); var command=xhr.getResponseHeader('web2py-component-command'); - var flash=xhr.getResponseHeader('web2py-component-flash'); + var flash=decodeURIComponent(xhr.getResponseHeader('web2py-component-flash')); var t = jQuery('#'+target); if(content=='prepend') t.prepend(html); else if(content=='append') t.append(html); diff --git a/applications/welcome/static/js/web2py.js b/applications/welcome/static/js/web2py.js index 6a84c20a..b2f7e8dd 100644 --- a/applications/welcome/static/js/web2py.js +++ b/applications/welcome/static/js/web2py.js @@ -86,7 +86,7 @@ function web2py_ajax_page(method, action, data, target) { var html=xhr.responseText; var content=xhr.getResponseHeader('web2py-component-content'); var command=xhr.getResponseHeader('web2py-component-command'); - var flash=xhr.getResponseHeader('web2py-component-flash'); + var flash=decodeURIComponent(xhr.getResponseHeader('web2py-component-flash')); var t = jQuery('#'+target); if(content=='prepend') t.prepend(html); else if(content=='append') t.append(html); diff --git a/gluon/main.py b/gluon/main.py index 2f69c6ba..7ddef895 100644 --- a/gluon/main.py +++ b/gluon/main.py @@ -28,6 +28,7 @@ import socket import tempfile import random import string +import urllib2 from fileutils import abspath, write_file, parse_version from settings import global_settings from admin import add_path_first, create_missing_folders, create_missing_app_folders @@ -541,10 +542,9 @@ def wsgibase(environ, responder): # ################################################## if request.cid: - if response.flash and not 'web2py-component-flash' in http_response.headers: http_response.headers['web2py-component-flash'] = \ - str(response.flash).replace('\n','') + urllib2.quote(str(response.flash).replace('\n','')) if response.js and not 'web2py-component-command' in http_response.headers: http_response.headers['web2py-component-command'] = \ response.js.replace('\n','')