Index: openacs-4/packages/acs-datetime/tcl/acs-calendar-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-datetime/tcl/acs-calendar-procs.tcl,v
diff -u -r1.31 -r1.31.2.1
--- openacs-4/packages/acs-datetime/tcl/acs-calendar-procs.tcl	17 Jul 2018 13:32:18 -0000	1.31
+++ openacs-4/packages/acs-datetime/tcl/acs-calendar-procs.tcl	11 Mar 2021 10:14:52 -0000	1.31.2.1
@@ -642,12 +642,8 @@
     set list_of_vars [list]
 
     # Ben: some annoying stuff to do here since we are passing in things in GET format already
-    if {$pass_in_vars ne ""} {
-        set vars [split $pass_in_vars "&"]
-        foreach var $vars {
-            set things [split $var "="]
-            lappend list_of_vars $things
-        }
+    foreach {key value} [ns_set array [ns_parsequery $pass_in_vars]] {
+        lappend list_of_vars [list $key $value]
     }
 
     # Get the current month, day, and the first day of the month
Index: openacs-4/packages/xooauth/tcl/oauth-client-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xooauth/tcl/oauth-client-procs.tcl,v
diff -u -r1.1.2.1 -r1.1.2.2
--- openacs-4/packages/xooauth/tcl/oauth-client-procs.tcl	7 Nov 2020 17:58:25 -0000	1.1.2.1
+++ openacs-4/packages/xooauth/tcl/oauth-client-procs.tcl	11 Mar 2021 10:18:06 -0000	1.1.2.2
@@ -81,9 +81,7 @@
     if {[$r set status_code] eq 200} {
       [:context] load_form_parameter
       #TODO: Also used by server - make a method
-      #TODO - Replace with a regexp
-      foreach pair [split [$r set data] &] {
-        lassign [split $pair =] key value
+      foreach {key value} [ns_set array [ns_parsequery [$r set data]] {
         set creds($key) [:decode $value]
         :log "set creds($key) [:decode $value]"
       }
Index: openacs-4/packages/xooauth/tcl/oauth-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xooauth/tcl/oauth-procs.tcl,v
diff -u -r1.1.2.2 -r1.1.2.3
--- openacs-4/packages/xooauth/tcl/oauth-procs.tcl	10 Nov 2020 08:44:57 -0000	1.1.2.2
+++ openacs-4/packages/xooauth/tcl/oauth-procs.tcl	11 Mar 2021 10:20:16 -0000	1.1.2.3
@@ -500,8 +500,7 @@
       set parameter_pair_list [list]
 
       # Step 1: Get query parameters
-      foreach pair [split $uri(query) &] {
-        lassign [split $pair =] key value
+      foreach {key value} [ns_set array [ns_parsequery $uri(query)]] {
         #:msg "parameter_list [list [ns_urldecode $key] [ns_urldecode $value]]"
         lappend parameter_pair_list [list [:decode $key] [:decode $value]]
       }
@@ -515,8 +514,7 @@
       # Step 3: Get Entity Body
       if {[string match "*x-www-form-urlencoded*" ${:content_type}]} {
         if {${:post_data} ne ""} {
-          foreach pair [split ${:post_data} &] {
-            lassign [split $pair =] key value
+          foreach {key value} [ns_set array [ns_parsequery ${:post_data}]] {
             #:msg "parameter_list [list [ns_urldecode $key] [ns_urldecode $value]]"
             lappend parameter_pair_list [list [:decode $key] [:decode $value]]
           }
Index: openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl,v
diff -u -r1.189.2.81 -r1.189.2.82
--- openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl	10 Mar 2021 10:56:48 -0000	1.189.2.81
+++ openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl	11 Mar 2021 10:24:24 -0000	1.189.2.82
@@ -790,8 +790,7 @@
     set max_age ""
     set user_binding 0
     set secret  [ns_config "ns/server/[ns_info server]/acs" parametersecret ""]
-    foreach def [split $params &] {
-        lassign [split $def =] key val
+    foreach {key val} [ns_set array [ns_parsequery $params]] {
         switch -- $key {
             max_age -
             secret {set $key [ad_urldecode_query $val]}