fixed escaping of response.js, issue 1205, thanks max.morais.dmm

This commit is contained in:
mdipierro committed 2012-12-06 23:02:09 -06:00
1 parent 30ff19b271
commit e08fdc42cf
2 files changed
+6 -3

No files matched your search

+5 -2
View File
@@ -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