Index: openacs-4/packages/xotcl-core/xotcl-core.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/xotcl-core.info,v diff -u -r1.86 -r1.87 --- openacs-4/packages/xotcl-core/xotcl-core.info 22 Oct 2011 22:12:47 -0000 1.86 +++ openacs-4/packages/xotcl-core/xotcl-core.info 22 Mar 2012 10:42:22 -0000 1.87 @@ -10,7 +10,7 @@ t xotcl - + Gustaf Neumann XOTcl library functionality (e.g. thread handling, online documentation, Generic Form and List Classes) 2011-01-14 @@ -43,7 +43,7 @@ BSD-Style 0 - + Index: openacs-4/packages/xotcl-core/tcl/30-widget-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/30-widget-procs.tcl,v diff -u -r1.51 -r1.52 --- openacs-4/packages/xotcl-core/tcl/30-widget-procs.tcl 22 Oct 2011 22:12:47 -0000 1.51 +++ openacs-4/packages/xotcl-core/tcl/30-widget-procs.tcl 22 Mar 2012 10:42:23 -0000 1.52 @@ -197,6 +197,13 @@ namespace eval ::xo { # + # Escape provided char in provided string with backslash + # + proc backslash_escape {char string} { + return [string map [list $char \\$char] $string] + } + + # # Localization # @@ -424,7 +431,8 @@ #ns_return 200 text/plain $output my instvar name if {![my exists name]} {set name "table"} - ns_set put [ns_conn outputheaders] Content-Disposition "attachment;filename=$name.csv" + set fn [xo::backslash_escape \" $name.csv] + ns_set put [ns_conn outputheaders] Content-Disposition "attachment;filename=\"$fn\"" ns_return 200 text/csv $output } Index: openacs-4/packages/xotcl-core/tcl/bgdelivery-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/bgdelivery-procs.tcl,v diff -u -r1.36 -r1.37 --- openacs-4/packages/xotcl-core/tcl/bgdelivery-procs.tcl 21 Sep 2011 07:51:42 -0000 1.36 +++ openacs-4/packages/xotcl-core/tcl/bgdelivery-procs.tcl 22 Mar 2012 10:42:23 -0000 1.37 @@ -445,7 +445,8 @@ && [info command h264open] ne ""}] if {[info exists content_disposition]} { - ns_set put [ns_conn outputheaders] Content-Disposition "attachment;filename=$content_disposition" + set fn [xo::backslash_escape \" $content_disposition] + ns_set put [ns_conn outputheaders] Content-Disposition "attachment;filename=\"$fn\"" } if {$use_h264} {