Index: openacs-4/packages/acs-templating/tcl/list-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/list-procs.tcl,v diff -u -r1.94.2.20 -r1.94.2.21 --- openacs-4/packages/acs-templating/tcl/list-procs.tcl 29 Aug 2022 14:17:24 -0000 1.94.2.20 +++ openacs-4/packages/acs-templating/tcl/list-procs.tcl 5 Sep 2022 15:07:20 -0000 1.94.2.21 @@ -762,13 +762,13 @@ set result {} - if { [string trim "[lindex $list_properties(from_clauses) 0]"] ne "" && $comma_p && ![string match "left*" [string trim [lindex $list_properties(from_clauses) 0]]]} { + if { ![string is space [lindex $list_properties(from_clauses) 0]] && $comma_p && ![string match "left*" [string trim [lindex $list_properties(from_clauses) 0]]]} { append result ", " } set i 0 foreach elm $list_properties(from_clauses) { - if {([string trim $elm] ne "" && ![string match "left*" [string trim $elm]]) + if {(![string is space $elm] && ![string match "left*" [string trim $elm]]) && ($comma_p || $i > 0)} { append results "," } @@ -1678,13 +1678,10 @@ # Now generate selected_p, urls, add_urls foreach elm $filter_properties(values) { - # Set label and value from the list element - # We do an lrange here, otherwise values would be set wrong - # in case someone accidentally supplies a list with too many elements, - # because then the foreach loop would run more than once - foreach { label value count } [lrange $elm 0 2] {} + # Set label, value and count from the list element + lassign $elm label value count - if { [string trim $label] eq "" } { + if { [string is space $label] } { set label $filter_properties(null_label) } switch -- $filter_properties(type) { @@ -1831,7 +1828,7 @@ # then the foreach loop would run more than once foreach { label value count } [lrange $elm 0 2] {} - if { [string trim $label] eq "" } { + if { [string is space $label] } { set label $filter_properties(null_label) } @@ -3381,7 +3378,7 @@ # because then the foreach loop would run more than once foreach { label value count } [lrange $elm 0 2] {} - if { [string trim $label] eq "" } { + if { [string is space $label] } { set label $filter_properties(null_label) } lappend options [list $label $value]