Index: openacs-4/packages/xotcl-request-monitor/tcl/throttle_mod-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-request-monitor/tcl/throttle_mod-procs.tcl,v
diff -u -N -r1.67.2.38 -r1.67.2.39
--- openacs-4/packages/xotcl-request-monitor/tcl/throttle_mod-procs.tcl 26 Jan 2021 21:00:12 -0000 1.67.2.38
+++ openacs-4/packages/xotcl-request-monitor/tcl/throttle_mod-procs.tcl 1 Feb 2021 10:47:36 -0000 1.67.2.39
@@ -1507,7 +1507,7 @@
puts -nonewline $dumpFile [join $cmds \n]\n
close $dumpFile
} else {
- file delete -force ${:file}
+ file delete -force -- ${:file}
set dumpFile [AsyncLogFile new -filename ${:file}]
#
# Write the content in smaller chunks.
Index: openacs-4/packages/xotcl-request-monitor/www/long-calls.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-request-monitor/www/long-calls.tcl,v
diff -u -N -r1.4.2.6 -r1.4.2.7
--- openacs-4/packages/xotcl-request-monitor/www/long-calls.tcl 15 Jul 2020 19:45:18 -0000 1.4.2.6
+++ openacs-4/packages/xotcl-request-monitor/www/long-calls.tcl 1 Feb 2021 10:47:36 -0000 1.4.2.7
@@ -24,7 +24,7 @@
}
proc ::xo::regsub_eval {re string cmd {prefix ""}} {
set map { \" \\\" \[ \\[ \] \\] \$ \\$ \\ \\\\}
- return [uplevel [list subst [regsub -all $re [string map $map $string] "\[$cmd\]"]]]
+ return [uplevel [list subst [regsub -all -- $re [string map $map $string] "\[$cmd\]"]]]
}
proc ::xo::subst_user_link {prefix uid} {
return $prefix[::xo::userid_link $uid]
Index: openacs-4/packages/acs-tcl/tcl/01-database-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/Attic/01-database-procs.tcl,v
diff -u -N -r1.1.2.20 -r1.1.2.21
--- openacs-4/packages/acs-tcl/tcl/01-database-procs.tcl 8 Dec 2020 14:33:45 -0000 1.1.2.20
+++ openacs-4/packages/acs-tcl/tcl/01-database-procs.tcl 1 Feb 2021 10:51:08 -0000 1.1.2.21
@@ -321,7 +321,7 @@
ad_proc -public db_quote { string } {
Quotes a string value to be placed in a SQL statement.
} {
- regsub -all {'} "$string" {''} result
+ regsub -all -- {'} "$string" {''} result
return $result
}
Index: openacs-4/packages/acs-tcl/tcl/adp-parser-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/adp-parser-procs.tcl,v
diff -u -N -r1.5.2.1 -r1.5.2.2
--- openacs-4/packages/acs-tcl/tcl/adp-parser-procs.tcl 13 Jul 2020 12:02:33 -0000 1.5.2.1
+++ openacs-4/packages/acs-tcl/tcl/adp-parser-procs.tcl 1 Feb 2021 10:51:08 -0000 1.5.2.2
@@ -59,8 +59,8 @@
Quotes special Tcl characters and newlines.
} {
- regsub -all {([\{\}\[\]\$\"\\])} $string {\\\1} string
- regsub -all {\n} $string {\\n} string
+ regsub -all -- {([\{\}\[\]\$\"\\])} $string {\\\1} string
+ regsub -all -- {\n} $string {\\n} string
return "\"$string\""
}
Index: openacs-4/packages/acs-tcl/tcl/apm-install-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-install-procs.tcl,v
diff -u -N -r1.126.2.12 -r1.126.2.13
--- openacs-4/packages/acs-tcl/tcl/apm-install-procs.tcl 28 Oct 2020 15:39:19 -0000 1.126.2.12
+++ openacs-4/packages/acs-tcl/tcl/apm-install-procs.tcl 1 Feb 2021 10:51:08 -0000 1.126.2.13
@@ -2340,7 +2340,7 @@
where package_key = :package_key
} {
# Removing the character "#".
- regsub -all {[\#]*} $instance_name {\1} instance_name
+ regsub -all -- {[\#]*} $instance_name {\1} instance_name
# Verifying whether this instance_name is a message_key
set is_msg [lang::message::message_exists_p [ad_conn locale] $instance_name]
Index: openacs-4/packages/acs-tcl/tcl/apm-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-procs.tcl,v
diff -u -N -r1.114.2.24 -r1.114.2.25
--- openacs-4/packages/acs-tcl/tcl/apm-procs.tcl 1 Dec 2020 09:27:11 -0000 1.114.2.24
+++ openacs-4/packages/acs-tcl/tcl/apm-procs.tcl 1 Feb 2021 10:51:08 -0000 1.114.2.25
@@ -956,7 +956,7 @@
Returns a CVS release tag for a particular package key and version name.
} {
- regsub -all {\.} [string toupper "$package_key-$version_name"] "-" release_tag
+ regsub -all -- {\.} [string toupper "$package_key-$version_name"] "-" release_tag
return $release_tag
}
@@ -1485,7 +1485,7 @@
} {
set procedure_name [string tolower "[string trim $package_key]_post_instantiation"]
# Change all "-" to "_" to mimic our Tcl standards
- regsub -all {\-} $procedure_name "_" procedure_name
+ regsub -all -- {\-} $procedure_name "_" procedure_name
if { [namespace which ::$procedure_name] eq "" } {
# No such procedure exists...
return ""
Index: openacs-4/packages/acs-tcl/tcl/deprecated-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/deprecated-procs.tcl,v
diff -u -N -r1.29.2.10 -r1.29.2.11
--- openacs-4/packages/acs-tcl/tcl/deprecated-procs.tcl 28 Oct 2020 15:39:19 -0000 1.29.2.10
+++ openacs-4/packages/acs-tcl/tcl/deprecated-procs.tcl 1 Feb 2021 10:51:08 -0000 1.29.2.11
@@ -1739,7 +1739,7 @@
} else {
set out $options
}
- regsub -all {@@} $out $i out
+ regsub -all -- {@@} $out $i out
append html "
[expr {$i + 1}]
$out
\n"
}
}
Index: openacs-4/packages/acs-tcl/tcl/html-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/html-procs.tcl,v
diff -u -N -r1.5.2.2 -r1.5.2.3
--- openacs-4/packages/acs-tcl/tcl/html-procs.tcl 6 Dec 2020 08:45:47 -0000 1.5.2.2
+++ openacs-4/packages/acs-tcl/tcl/html-procs.tcl 1 Feb 2021 10:51:09 -0000 1.5.2.3
@@ -162,7 +162,7 @@
}
# Formfield's name can contain colons,
# I need to escape them.
- regsub -all {:} $name {\:} name
+ regsub -all -- {:} $name {\:} name
lappend vars [list $name $value]
}
Index: openacs-4/packages/acs-tcl/tcl/install-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/install-procs.tcl,v
diff -u -N -r1.35.2.4 -r1.35.2.5
--- openacs-4/packages/acs-tcl/tcl/install-procs.tcl 27 Sep 2020 17:56:56 -0000 1.35.2.4
+++ openacs-4/packages/acs-tcl/tcl/install-procs.tcl 1 Feb 2021 10:51:09 -0000 1.35.2.5
@@ -113,7 +113,7 @@
set out [list]
# Remove double slashes
- regsub -all {//} $mount_point "/" mount_point
+ regsub -all -- {//} $mount_point "/" mount_point
set mount_point [string trim $mount_point " /"]
if {[string is space $mount_point] || $mount_point eq "/"} {
@@ -197,7 +197,7 @@
set out [list]
# Remove double slashes
- regsub -all {//} $mount_point "/" mount_point
+ regsub -all -- {//} $mount_point "/" mount_point
set mount_point [string trim $mount_point " /"]
if {[string is space $mount_point] || $mount_point eq "/"} {
@@ -1038,7 +1038,7 @@
}
# Remove double slashes
- regsub -all {//} $url "/" url
+ regsub -all -- {//} $url "/" url
if { $package_key ne "" && $url ne "" } {
error "set-parameter: Can't specify both package and url for $url and $package_key"
Index: openacs-4/packages/acs-tcl/tcl/json-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/json-procs.tcl,v
diff -u -N -r1.11.2.1 -r1.11.2.2
--- openacs-4/packages/acs-tcl/tcl/json-procs.tcl 13 Jul 2020 12:02:33 -0000 1.11.2.1
+++ openacs-4/packages/acs-tcl/tcl/json-procs.tcl 1 Feb 2021 10:51:09 -0000 1.11.2.2
@@ -371,10 +371,10 @@
set value "\"$value\""
}
# Cleanup linebreaks
- regsub -all {\r\n} $value "\n" value
- regsub -all {\r} $value "\n" value
+ regsub -all -- {\r\n} $value "\n" value
+ regsub -all -- {\r} $value "\n" value
# JSON requires new line characters be escaped
- regsub -all {\n} $value "\\n" value
+ regsub -all -- {\n} $value "\\n" value
return $value
}
}
Index: openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl,v
diff -u -N -r1.153.2.29 -r1.153.2.30
--- openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl 5 Jan 2021 17:10:17 -0000 1.153.2.29
+++ openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl 1 Feb 2021 10:51:09 -0000 1.153.2.30
@@ -1372,7 +1372,7 @@
# Sub out funky characters in the pathname, so the user can't request
# http://www.arsdigita.com/*/index (causing a potentially expensive glob
# and bypassing registered procedures)!
- regsub -all {[^0-9a-zA-Z_/:.]} $path {\\&} path_glob
+ regsub -all -- {[^0-9a-zA-Z_/:.]} $path {\\&} path_glob
# Grab a list of all available files with extensions.
set files [glob -nocomplain "$path_glob$extension_pattern"]
Index: openacs-4/packages/acs-tcl/tcl/stack-trace-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/stack-trace-procs.tcl,v
diff -u -N -r1.4 -r1.4.2.1
--- openacs-4/packages/acs-tcl/tcl/stack-trace-procs.tcl 7 Aug 2017 23:48:00 -0000 1.4
+++ openacs-4/packages/acs-tcl/tcl/stack-trace-procs.tcl 1 Feb 2021 10:51:09 -0000 1.4.2.1
@@ -31,7 +31,7 @@
if {[string length $call] > 160} {
set call "[string range $call 0 150]..."
}
- regsub -all {\n} $call {\\n} call
+ regsub -all -- {\n} $call {\\n} call
lappend callStack " $call"
if {$i > 1} {
lappend callStack "invoked from within"
Index: openacs-4/packages/acs-tcl/tcl/tcltrace-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/tcltrace-procs.tcl,v
diff -u -N -r1.4.2.5 -r1.4.2.6
--- openacs-4/packages/acs-tcl/tcl/tcltrace-procs.tcl 20 Aug 2020 05:22:28 -0000 1.4.2.5
+++ openacs-4/packages/acs-tcl/tcl/tcltrace-procs.tcl 1 Feb 2021 10:51:09 -0000 1.4.2.6
@@ -66,7 +66,7 @@
if {$severity in $::__log_severities} {
# we do not want i18n raw strings substituted via ds_comment.
# Maybe we should add this substitution there....
- regsub -all {\#([a-zA-Z0-9._-]+)\#} $msg {\#\1\#} msg
+ regsub -all -- {\#([a-zA-Z0-9._-]+)\#} $msg {\#\1\#} msg
catch {ds_comment "$cmdname $severity $msg"}
} else {
#catch {ds_comment "ignore $severity $msg"}
Index: openacs-4/packages/acs-tcl/tcl/text-html-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/text-html-procs.tcl,v
diff -u -N -r1.109.2.18 -r1.109.2.19
--- openacs-4/packages/acs-tcl/tcl/text-html-procs.tcl 28 Oct 2020 15:39:19 -0000 1.109.2.18
+++ openacs-4/packages/acs-tcl/tcl/text-html-procs.tcl 1 Feb 2021 10:51:09 -0000 1.109.2.19
@@ -186,25 +186,25 @@
if { !$no_quote_p } {
# Convert every two spaces to an nbsp
- regsub -all { } $text "\\\ " text
+ regsub -all -- { } $text "\\\ " text
# Convert tabs to four nbsp's
- regsub -all {\t} $text {\ \ \ \ } text
+ regsub -all -- {\t} $text {\ \ \ \ } text
}
if { $nr_links > 0} {
#
# Move the end of the link before any punctuation marks at the
# end of the URL.
#
- regsub -all {([\]!?.:;,<>\(\)\}\"'-]+)(\u0003)} $text {\2\1} text
+ regsub -all -- {([\]!?.:;,<>\(\)\}\"'-]+)(\u0003)} $text {\2\1} text
#
# Convert the marked links and emails into "..."
#
- regsub -all {\u0002([^\u0003]+?)\u0003} $text {\1} text
+ regsub -all -- {\u0002([^\u0003]+?)\u0003} $text {\1} text
- set changed_back [regsub -all {(\u0002|\u0003)} $text {} text]
+ set changed_back [regsub -all -- {(\u0002|\u0003)} $text {} text]
if {$includes_html_p} {
#
# All markers should be gone now.
@@ -270,7 +270,7 @@
#
if {[info exists path]} {
set path "[string trim $path /]/"
- regsub -all {(href|src)\s*=\s*['\"]([^/][^\u0001:'\"]+?)['\"]} $html \
+ regsub -all -- {(href|src)\s*=\s*['\"]([^/][^\u0001:'\"]+?)['\"]} $html \
"\\1='${location}${path}\\2'" html
}
@@ -300,14 +300,14 @@
regsub {[\s]+$} $text {} text
# Make sure all line breaks are single \n's
- regsub -all {\r\n} $text "\n" text
- regsub -all {\r} $text "\n" text
+ regsub -all -- {\r\n} $text "\n" text
+ regsub -all -- {\r} $text "\n" text
# Remove whitespace before \n's
- regsub -all {[ \t]+\n} $text "\n" text
+ regsub -all -- {[ \t]+\n} $text "\n" text
# Wrap P's around paragraphs
- regsub -all {([^\n\s])\n\n+([^\n\s])} $text {\1
\2} text
+ regsub -all -- {([^\n\s])\n\n+([^\n\s])} $text {\1
\2} text
# remove line breaks right before and after HTML tags that will insert a paragraph break themselves
if { $includes_html_p } {
@@ -316,10 +316,10 @@
}
# Convert _single_ CRLF's to 's to preserve line breaks
- regsub -all {\n} $text " \n" text
+ regsub -all -- {\n} $text " \n" text
# Add line breaks to P tags
- #regsub -all {
} $text "\n" text
+ #regsub -all -- {} $text "\n" text
return $text
}
@@ -529,7 +529,7 @@
# First try to fix up < not part of a tag.
- regsub -all {<([^/[:alpha:]!])} $frag {\<\1} frag
+ regsub -all -- {<([^/[:alpha:]!])} $frag {\<\1} frag
# no we do is chop off any trailing unclosed tag
# since when we substr blobs this sometimes happens
@@ -1434,14 +1434,14 @@
string map [list \n \\n \b \\b \f \\f \r \\r \t \\t \v \\v \" {\"} ' {\'}] $string
# Escape quotes and backslashes (non greedy)
- #regsub -all {.??([^\\])?('|\"|\\)} $string {\1\\\2} string
+ #regsub -all -- {.??([^\\])?('|\"|\\)} $string {\1\\\2} string
# Escape characters are replaced with their escape sequence
- #regsub -all {\b} $string {\\b} string
- #regsub -all {\f} $string {\\f} string
- #regsub -all {\n} $string {\\n} string
- #regsub -all {\r} $string {\\r} string
- #regsub -all {\t} $string {\\t} string
- #regsub -all {\v} $string {\\v} string
+ #regsub -all -- {\b} $string {\\b} string
+ #regsub -all -- {\f} $string {\\f} string
+ #regsub -all -- {\n} $string {\\n} string
+ #regsub -all -- {\r} $string {\\r} string
+ #regsub -all -- {\t} $string {\\t} string
+ #regsub -all -- {\v} $string {\\v} string
#return $string
}
@@ -1787,7 +1787,7 @@
# If we're not in a PRE
if { $output(pre) <= 0 } {
# collapse all whitespace
- regsub -all {\s+} $text { } text
+ regsub -all -- {\s+} $text { } text
# if there's only spaces in the string, wait until later
if {$text eq " "} {
@@ -1807,10 +1807,10 @@
}
} else {
# we're in a PRE: clean line breaks and tabs
- regsub -all {\r\n} $text "\n" text
- regsub -all {\r} $text "\n" text
+ regsub -all -- {\r\n} $text "\n" text
+ regsub -all -- {\r} $text "\n" text
# tabs become four spaces
- regsub -all {[\v\t]} $text { } text
+ regsub -all -- {[\v\t]} $text { } text
}
# output any pending paragraph breaks, line breaks or spaces.
@@ -1853,7 +1853,7 @@
# convert 's
# We do this now, so that they're displayed, but not treated, whitespace.
- regsub -all { } $word { } word
+ regsub -all -- { } $word { } word
set wordlen [string length $word]
switch -glob -- $word {
@@ -1920,14 +1920,14 @@
consider how they interact with character encodings.
} {
- regsub -all {<} $html {<} html
- regsub -all {>} $html {>} html
- regsub -all {"} $html "\"" html
- regsub -all {—} $html {--} html
- regsub -all {} $html {--} html
+ regsub -all -- {<} $html {<} html
+ regsub -all -- {>} $html {>} html
+ regsub -all -- {"} $html "\"" html
+ regsub -all -- {—} $html {--} html
+ regsub -all -- {} $html {--} html
# Need to do the & last, because otherwise it could interfere with the other expansions,
# e.g., if the text said <, that would be translated into <, instead of <
- regsub -all {&} $html {\&} html
+ regsub -all -- {&} $html {\&} html
return $html
}
@@ -2444,7 +2444,7 @@
ad_proc util_remove_html_tags { html } {
Removes everything between < and > from the string.
} {
- regsub -all {<[^>]*>} $html {} html
+ regsub -all -- {<[^>]*>} $html {} html
return $html
}
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 -N -r1.189.2.75 -r1.189.2.76
--- openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 29 Jan 2021 15:40:05 -0000 1.189.2.75
+++ openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 1 Feb 2021 10:51:09 -0000 1.189.2.76
@@ -172,7 +172,7 @@
return ""
} else {
set tentative_path [nsv_get proc_source_file $proc_name]
- regsub -all {/\./} $tentative_path {/} result
+ regsub -all -- {/\./} $tentative_path {/} result
return $result
}
}
@@ -185,7 +185,7 @@
private Tcl library files contain errors.
} {
set tentative_path [info script]
- regsub -all {/\./} $tentative_path {/} scrubbed_path
+ regsub -all -- {/\./} $tentative_path {/} scrubbed_path
if { $extra_message eq "" } {
set message "Loading $scrubbed_path"
} else {
@@ -587,12 +587,12 @@
if { $precedence_type ne "noprocessing_vars" } {
# Hide escaped colons for below split
- regsub -all {\\:} $var_spec "!!cOlOn!!" var_spec
+ regsub -all -- {\\:} $var_spec "!!cOlOn!!" var_spec
set name_spec [split [lindex $var_spec 0] ":"]
# Replace escaped colons with single colon
- regsub -all {!!cOlOn!!} $name_spec ":" name_spec
+ regsub -all -- {!!cOlOn!!} $name_spec ":" name_spec
set name [lindex $name_spec 0]
} else {
@@ -971,7 +971,7 @@
files contain errors.
} {
set tentative_path [info script]
- regsub -all {/\./} $tentative_path {/} scrubbed_path
+ regsub -all -- {/\./} $tentative_path {/} scrubbed_path
if { $extra_message eq "" } {
set message "Done... $scrubbed_path"
} else {
@@ -1302,8 +1302,8 @@
same as ns_urlencode except that dash and underscore are left unencoded.
} {
set encoded_string [ns_urlencode $string]
- regsub -all {%2d} $encoded_string {-} encoded_string
- regsub -all {%5f} $encoded_string {_} ad_encoded_string
+ regsub -all -- {%2d} $encoded_string {-} encoded_string
+ regsub -all -- {%5f} $encoded_string {_} ad_encoded_string
return $ad_encoded_string
}
@@ -1610,7 +1610,7 @@
}
# Sanitize URL to avoid potential injection attack
- regsub -all {[\r\n]} $url "" url
+ regsub -all -- {[\r\n]} $url "" url
ns_returnredirect $url
}
@@ -2389,7 +2389,7 @@
set line_length 0
set line_number 0
foreach item $items {
- regsub -all {<[^>]+>} $item "" item_notags
+ regsub -all -- {<[^>]+>} $item "" item_notags
if { $line_length > $indent } {
if { $line_length + 1 + [string length $item_notags] > $length } {
append out "$eol\n"
@@ -2442,18 +2442,18 @@
#
# Remove Control characters (0x00–0x1f and 0x80–0x9f)
# and reserved characters (/, ?, <, >, \, :, *, |, ; and ")
- regsub -all {[\u0000-\u001f|/|?|<|>|\\:*|\"|;]+} $str "" str
+ regsub -all -- {[\u0000-\u001f|/|?|<|>|\\:*|\"|;]+} $str "" str
# allow a custom replacement char, that must be safe.
- regsub -all {[\u0000-\u001f|/|?|<|>|\\:*|\"|;|\.]+} $replace_with "" replace_with
+ regsub -all -- {[\u0000-\u001f|/|?|<|>|\\:*|\"|;|\.]+} $replace_with "" replace_with
if {$replace_with eq ""} {error "-replace_with must be a safe filesystem character"}
# dots other than in file extension are dangerous. Put inside two
# '#' character will be seen as message keys and file-storage is
# currently set to interpret them.
set str_ext [ad_file extension $str]
set str_noext [string range $str 0 end-[string length $str_ext]]
- regsub -all {\.} $str_noext $replace_with str_noext
+ regsub -all -- {\.} $str_noext $replace_with str_noext
set str ${str_noext}${str_ext}
#
@@ -2483,7 +2483,7 @@
#
# replace all consecutive spaces by a single char
#
- regsub -all {[ ]+} $str $replace_with str
+ regsub -all -- {[ ]+} $str $replace_with str
}
if {$tolower_p} {
#
@@ -2575,7 +2575,7 @@
set text [string map { \xe6 ae \xf8 oe \xe5 aa \xC6 Ae \xd8 Oe \xc5 Aa } $text]
# substitute all non-word characters
- regsub -all {([^a-z0-9])+} $text $replacement text
+ regsub -all -- {([^a-z0-9])+} $text $replacement text
set text [string trim $text $replacement]
@@ -3043,8 +3043,8 @@
} {
Transforms a pretty name to a reasonable pathname.
} {
- regsub -all -nocase { } [string trim [string tolower $name]] {-} name
- regsub -all {[^[:alnum:]\-]} $name {} name
+ regsub -all -nocase -- { } [string trim [string tolower $name]] {-} name
+ regsub -all -- {[^[:alnum:]\-]} $name {} name
return $name
}
@@ -3088,9 +3088,9 @@
ad_proc -public util::subst_safe { string } {
Make string safe for subst'ing.
} {
- regsub -all {\$} $string {\$} string
- regsub -all {\[} $string {\[} string
- regsub -all {\]} $string {\]} string
+ regsub -all -- {\$} $string {\$} string
+ regsub -all -- {\[} $string {\[} string
+ regsub -all -- {\]} $string {\]} string
return $string
}
@@ -3838,11 +3838,11 @@
#
# Handle array syntax:
#
- regsub -all {\$([0-9a-zA-Z_:]*[\(][^\)]+[\)])} $escaped {[ns_quotehtml [set \1]]} escaped
+ regsub -all -- {\$([0-9a-zA-Z_:]*[\(][^\)]+[\)])} $escaped {[ns_quotehtml [set \1]]} escaped
#
# Handle plain variables:
#
- regsub -all {\$([0-9a-zA-Z_:]+|[\{][^\}]+[\}])} $escaped {[ns_quotehtml $\1]} result
+ regsub -all -- {\$([0-9a-zA-Z_:]+|[\{][^\}]+[\}])} $escaped {[ns_quotehtml $\1]} result
#
# Finallly, "subst" the result.
#
@@ -4106,7 +4106,7 @@
# Remove potentially stale gzip file.
#
if {[ad_file exists $local_path/$file.gz]} {
- file delete $local_path/$file.gz
+ file delete -- $local_path/$file.gz
}
#
Index: openacs-4/packages/acs-tcl/tcl/xml-0-sgml-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/xml-0-sgml-procs.tcl,v
diff -u -N -r1.10.2.5 -r1.10.2.6
--- openacs-4/packages/acs-tcl/tcl/xml-0-sgml-procs.tcl 27 Sep 2020 18:10:28 -0000 1.10.2.5
+++ openacs-4/packages/acs-tcl/tcl/xml-0-sgml-procs.tcl 1 Feb 2021 10:51:09 -0000 1.10.2.6
@@ -128,17 +128,17 @@
}
# Protect Tcl special characters
- regsub -all {([{}\\])} $sgml {\\\1} sgml
+ regsub -all -- {([{}\\])} $sgml {\\\1} sgml
# Do the translation
if {[info exists options(-statevariable)]} {
upvar #0 $opts(-statevariable) unused
if {[info exists unused]} {
- regsub -all $elemExpr $unused$sgml $elemSub sgml
+ regsub -all -- $elemExpr $unused$sgml $elemSub sgml
unset unused
} else {
- regsub -all $elemExpr $sgml $elemSub sgml
+ regsub -all -- $elemExpr $sgml $elemSub sgml
}
set sgml "{} {} {} \{$sgml\}"
@@ -154,7 +154,7 @@
# Performance note (Tcl 8.0):
# In this case, no conversion to list object is performed
- regsub -all $elemExpr $sgml $elemSub sgml
+ regsub -all -- $elemExpr $sgml $elemSub sgml
set sgml "{} {} {} \{$sgml\}"
}
@@ -546,14 +546,14 @@
} {
# protect Tcl specials
- regsub -all {([][$\\])} $text {\\\1} text
+ regsub -all -- {([][$\\])} $text {\\\1} text
# Mark entity references
- regsub -all {&([^;]+);} $text [format {%s; %s {\1} ; %s %s} \}\} [namespace code [list Entity options $options(-entityreferencecommand) $options(-characterdatacommand) $options(-entityvariable)]] [list uplevel #0 $options(-characterdatacommand)] \{\{] text
+ regsub -all -- {&([^;]+);} $text [format {%s; %s {\1} ; %s %s} \}\} [namespace code [list Entity options $options(-entityreferencecommand) $options(-characterdatacommand) $options(-entityvariable)]] [list uplevel #0 $options(-characterdatacommand)] \{\{] text
set text "uplevel #0 $options(-characterdatacommand) {{$text}}"
eval $text
} else {
# Restore protected special characters
- regsub -all {\\([{}\\])} $text {\1} text
+ regsub -all -- {\\([{}\\])} $text {\1} text
uplevel #0 $options(-characterdatacommand) [list $text]
}
} elseif {[string length [string trim $text]]} {
@@ -851,7 +851,7 @@
set exp ]+)[cl $Wsp]*([cl ^$Wsp]+)[cl $Wsp]*([cl ^>]*)>
set sub {{\1} {\2} {\3} }
- regsub -all $exp $dtd $sub dtd
+ regsub -all -- $exp $dtd $sub dtd
foreach {decl id value} $dtd {
catch {DTD:[string toupper $decl] $id $value} err
@@ -986,9 +986,9 @@
return -code error "illegal characters in specification"
}
- regsub -all [format {(%s)[%s]*(\?|\*|\+)?[%s]*(,|\|)?} $name $Wsp $Wsp] $spec [format {%sCModelSTname %s {\1} {\2} {\3}} \n $state] spec
- regsub -all {\(} $spec "\nCModelSTopenParen $state " spec
- regsub -all [format {\)[%s]*(\?|\*|\+)?[%s]*(,|\|)?} $Wsp $Wsp] $spec [format {%sCModelSTcloseParen %s {\1} {\2}} \n $state] spec
+ regsub -all -- [format {(%s)[%s]*(\?|\*|\+)?[%s]*(,|\|)?} $name $Wsp $Wsp] $spec [format {%sCModelSTname %s {\1} {\2} {\3}} \n $state] spec
+ regsub -all -- {\(} $spec "\nCModelSTopenParen $state " spec
+ regsub -all -- [format {\)[%s]*(\?|\*|\+)?[%s]*(,|\|)?} $Wsp $Wsp] $spec [format {%sCModelSTcloseParen %s {\1} {\2}} \n $state] spec
array set var {stack {} state start}
eval $spec
@@ -1540,10 +1540,10 @@
} else {
# Parse the attribute list. If it were regular, could just use foreach,
# but some attributes may have values.
- regsub -all {([][$\\])} $value {\\\1} value
- regsub -all $attlist_exp $value {[DTDAttribute {\1} {\2} {\3}]} value
- regsub -all $attlist_enum_exp $value {[DTDAttribute {\1} {\2} {\3}]} value
- regsub -all $attlist_fixed_exp $value {[DTDAttribute {\1} {\2} {\3} {\4}]} value
+ regsub -all -- {([][$\\])} $value {\\\1} value
+ regsub -all -- $attlist_exp $value {[DTDAttribute {\1} {\2} {\3}]} value
+ regsub -all -- $attlist_enum_exp $value {[DTDAttribute {\1} {\2} {\3}]} value
+ regsub -all -- $attlist_fixed_exp $value {[DTDAttribute {\1} {\2} {\3} {\4}]} value
subst $value
set am($id) [array get attlist]
}
@@ -1677,7 +1677,7 @@
# As above
proc sgml::zapWhite data {
- regsub -all "\[ \t\r\n\]+" $data { } data
+ regsub -all -- "\[ \t\r\n\]+" $data { } data
return $data
}
Index: openacs-4/packages/acs-tcl/tcl/xml-1-dom-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/xml-1-dom-procs.tcl,v
diff -u -N -r1.11.2.2 -r1.11.2.3
--- openacs-4/packages/acs-tcl/tcl/xml-1-dom-procs.tcl 5 Jan 2021 17:10:17 -0000 1.11.2.2
+++ openacs-4/packages/acs-tcl/tcl/xml-1-dom-procs.tcl 1 Feb 2021 10:51:09 -0000 1.11.2.3
@@ -1723,7 +1723,7 @@
' '
}
- regsub -all {([$<>&"'])} $value {$Entity(\1)} value
+ regsub -all -- {([$<>&"'])} $value {$Entity(\1)} value
return [subst -nocommand -nobackslash $value]
}
Index: openacs-4/packages/acs-tcl/tcl/xml-2-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/xml-2-procs.tcl,v
diff -u -N -r1.5.2.2 -r1.5.2.3
--- openacs-4/packages/acs-tcl/tcl/xml-2-procs.tcl 28 Oct 2020 15:39:19 -0000 1.5.2.2
+++ openacs-4/packages/acs-tcl/tcl/xml-2-procs.tcl 1 Feb 2021 10:51:09 -0000 1.5.2.3
@@ -330,7 +330,7 @@
# As above
proc xml::zapWhite data {
- regsub -all "\[ \t\r\n\]+" $data { } data
+ regsub -all -- "\[ \t\r\n\]+" $data { } data
return $data
}
Index: openacs-4/packages/acs-tcl/tcl/test/doc-check-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/test/doc-check-procs.tcl,v
diff -u -N -r1.20.2.12 -r1.20.2.13
--- openacs-4/packages/acs-tcl/tcl/test/doc-check-procs.tcl 16 Dec 2020 17:14:27 -0000 1.20.2.12
+++ openacs-4/packages/acs-tcl/tcl/test/doc-check-procs.tcl 1 Feb 2021 10:51:09 -0000 1.20.2.13
@@ -52,7 +52,7 @@
ns_log notice "$p"
incr count
set tail [namespace tail $p]
- set qualifiers [regsub -all "::" [namespace qualifiers $p] "__"]
+ set qualifiers [regsub -all -- "::" [namespace qualifiers $p] "__"]
if {[regexp $internalUse $p] || [regexp $serverModuleProcs $p] || [regexp $functionalOps $p] || [regexp $xmlRPC $p]} continue
set pa [nsv_get api_proc_doc $p]
set protection [expr {[dict exists $pa protection] && "public" in [dict get $pa protection]
Index: openacs-4/packages/acs-tcl/tcl/test/http-client-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/test/Attic/http-client-procs.tcl,v
diff -u -N -r1.1.2.13 -r1.1.2.14
--- openacs-4/packages/acs-tcl/tcl/test/http-client-procs.tcl 13 Jan 2021 11:00:18 -0000 1.1.2.13
+++ openacs-4/packages/acs-tcl/tcl/test/http-client-procs.tcl 1 Feb 2021 10:51:09 -0000 1.1.2.14
@@ -125,7 +125,7 @@
close $rfd
aa_true "Setting the charset actually brings to different content in the response" {$app_json_text ne $iso8859_2_text}
- file delete $tmpfile_app_json $tmpfile_iso8859_2
+ file delete -- $tmpfile_app_json $tmpfile_iso8859_2
}
}
}
Index: openacs-4/packages/acs-templating/tcl/acs-integration-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/acs-integration-procs.tcl,v
diff -u -N -r1.27.2.4 -r1.27.2.5
--- openacs-4/packages/acs-templating/tcl/acs-integration-procs.tcl 3 Jul 2020 07:27:29 -0000 1.27.2.4
+++ openacs-4/packages/acs-templating/tcl/acs-integration-procs.tcl 1 Feb 2021 10:54:23 -0000 1.27.2.5
@@ -137,12 +137,12 @@
set apm_package_url [apm_package_url_from_key "acs-lang"]
# Attempt to move all message keys outside of tags
- while { [regsub -all {(<[^>]*)(\x02\(\x01[^\x01]*\x01\)\x02)([^>]*>)} $parsed_template {\2\1\3} parsed_template] } {}
+ while { [regsub -all -- {(<[^>]*)(\x02\(\x01[^\x01]*\x01\)\x02)([^>]*>)} $parsed_template {\2\1\3} parsed_template] } {}
# Attempt to move all message keys outside of statements
- regsub -all -nocase {(]*>)} $parsed_template {\2\1\3} parsed_template
+ regsub -all -nocase -- {(]*>)} $parsed_template {\2\1\3} parsed_template
- while { [regsub -all -nocase {(