From 8f7b82fdb3a9404e718bdce8539c24b0a5405431 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Thu, 6 Dec 2012 23:02:09 -0600 Subject: [PATCH] fixed escaping of response.js, issue 1205, thanks max.morais.dmm --- VERSION | 2 +- gluon/main.py | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index 9bced999..86c22746 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.3.0 (2012-12-06 16:55:43) rc1 +Version 2.3.0 (2012-12-06 23:01:24) rc1 diff --git a/gluon/main.py b/gluon/main.py index 58df9dfa..baa82ff5 100644 --- a/gluon/main.py +++ b/gluon/main.py @@ -577,9 +577,12 @@ def wsgibase(environ, responder): if request.cid: if response.flash: - http_response.headers['web2py-component-flash'] = urllib2.quote(xmlescape(response.flash).replace('\n', '')) + http_response.headers['web2py-component-flash'] = \ + urllib2.quote(xmlescape(response.flash)\ + .replace('\n','')) if response.js: - http_response.headers['web2py-component-command'] = response.js.replace('\n', '') + http_response.headers['web2py-component-command'] = \ + urllib2.quote(response.js.replace('\n','')) # ################################################## # store cookies in headers