Index: openacs-4/packages/acs-templating/tcl/richtext-or-file-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/richtext-or-file-procs.tcl,v diff -u -r1.8 -r1.9 --- openacs-4/packages/acs-templating/tcl/richtext-or-file-procs.tcl 7 Aug 2017 23:48:02 -0000 1.8 +++ openacs-4/packages/acs-templating/tcl/richtext-or-file-procs.tcl 1 Oct 2017 12:16:05 -0000 1.9 @@ -116,7 +116,7 @@ # as a non-value in case of a required element. set storage_type [ns_queryget $element_id.storage_type] - switch $storage_type { + switch -- $storage_type { text { set text [ns_queryget $element_id.text] if { $text eq "" } { @@ -162,7 +162,7 @@ set tmp_filename [lindex $richtext_or_file_list 4] set content_url [lindex $richtext_or_file_list 5] - switch $what { + switch -- $what { storage_type { # Replace contents with value return [list $value $mime_type $text $filename $tmp_filename $content_url] @@ -210,7 +210,7 @@ set tmp_filename [lindex $richtext_or_file_list 4] set content_url [lindex $richtext_or_file_list 5] - switch $what { + switch -- $what { storage_type { return $storage_type } @@ -233,7 +233,7 @@ return [list $filename $tmp_filename $mime_type] } html_value { - switch $storage_type { + switch -- $storage_type { text { return [ad_html_text_convert -from $mime_type -to "text/html" -- $text] }