From f3e5b0dce11a9a7533046f5f3defdc96e24efb72 Mon Sep 17 00:00:00 2001 From: ilvalle Date: Tue, 24 Feb 2015 19:45:35 +0100 Subject: [PATCH] fix issue 799, removed new lines from response header --- applications/admin/controllers/default.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/applications/admin/controllers/default.py b/applications/admin/controllers/default.py index 4623c517..69634040 100644 --- a/applications/admin/controllers/default.py +++ b/applications/admin/controllers/default.py @@ -1427,14 +1427,13 @@ def create_file(): if request.vars.dir: response.flash = result response.headers['web2py-component-content'] = 'append' - response.headers['web2py-component-command'] = """ - $.web2py.invalidate('#files_menu'); - load_file('%s'); - $.web2py.enableElement($('#form form').find($.web2py.formInputClickSelector)); - """ % URL('edit', args=[app,request.vars.dir,filename]) + response.headers['web2py-component-command'] = "%s %s %s" % ( + "$.web2py.invalidate('#files_menu');", + "load_file('%s');" % URL('edit', args=[app,request.vars.dir,filename]), + "$.web2py.enableElement($('#form form').find($.web2py.formInputClickSelector));") return '' else: - redirect(request.vars.sender + anchor) + redirect(request.vars.sender + anchor) def listfiles(app, dir, regexp='.*\.py$'):