Index: openacs-4/packages/xotcl-core/tcl/03-doc-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/03-doc-procs.tcl,v diff -u -N -r1.22.2.5 -r1.22.2.6 --- openacs-4/packages/xotcl-core/tcl/03-doc-procs.tcl 8 Aug 2020 08:08:20 -0000 1.22.2.5 +++ openacs-4/packages/xotcl-core/tcl/03-doc-procs.tcl 1 Feb 2021 10:41:29 -0000 1.22.2.6 @@ -299,7 +299,7 @@ } set string [join $lines \n] set html [ns_quotehtml $string] - regsub -all {(\n[\t ]*)(\#[^\n]*)} $html \\1\\2 html + regsub -all -- {(\n[\t ]*)(\#[^\n]*)} $html \\1\\2 html return "
$html
" } Index: openacs-4/packages/xotcl-core/tcl/05-db-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/05-db-procs.tcl,v diff -u -N -r1.148.2.30 -r1.148.2.31 --- openacs-4/packages/xotcl-core/tcl/05-db-procs.tcl 24 Jan 2021 19:54:13 -0000 1.148.2.30 +++ openacs-4/packages/xotcl-core/tcl/05-db-procs.tcl 1 Feb 2021 10:41:29 -0000 1.148.2.31 @@ -922,13 +922,13 @@ if {[info exists col]} { set colExpSQL $col - regsub -all ", *" $col _ colExpName + regsub -all -- ", *" $col _ colExpName } else { set colExpSQL ($expression) if {[info exists expression_name]} { set colExpName $expression_name } else { - regsub -all {[^[:alnum:]]} $expression "" colExpName + regsub -all -- {[^[:alnum:]]} $expression "" colExpName } } set suffix [expr {$unique ? "un_idx" : "idx"}] 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 -N -r1.70.2.19 -r1.70.2.20 --- openacs-4/packages/xotcl-core/tcl/30-widget-procs.tcl 5 Jan 2021 09:38:20 -0000 1.70.2.19 +++ openacs-4/packages/xotcl-core/tcl/30-widget-procs.tcl 1 Feb 2021 10:41:29 -0000 1.70.2.20 @@ -231,7 +231,7 @@ } proc escape_message_keys {text} { - regsub -all {(\#[a-zA-Z0-9_:-]+\.[a-zA-Z0-9_:-]+)\#} $text "\\1\x01#" text + regsub -all -- {(\#[a-zA-Z0-9_:-]+\.[a-zA-Z0-9_:-]+)\#} $text "\\1\x01#" text return $text } @@ -253,12 +253,12 @@ set return_text "" if {$inline} { # Attempt to move all message keys outside of tags - while { [regsub -all {(<[^>]*)(\x02\(\x01[^\x01]*\x01\)\x02)([^>]*>)} $text {\2\1\3} text] } {} + while { [regsub -all -- {(<[^>]*)(\x02\(\x01[^\x01]*\x01\)\x02)([^>]*>)} $text {\2\1\3} text] } {} # Attempt to move all message keys outside of statements - regsub -all -nocase {(]*>[^<]*)(\x02\(\x01[^\x01]*\x01\)\x02)([^<]*]*>)} $text {\2\1\3} text + regsub -all -nocase -- {(]*>[^<]*)(\x02\(\x01[^\x01]*\x01\)\x02)([^<]*]*>)} $text {\2\1\3} text - while { [regsub -all -nocase {(]*>[^<]*)(\x02\(\x01[^\x01]*\x01\)\x02)} $text {\2\1} text] } {} + while { [regsub -all -nocase -- {(]*>[^<]*)(\x02\(\x01[^\x01]*\x01\)\x02)} $text {\2\1} text] } {} } while {[regexp {^([^\x02]*)\x02\(\x01([^\x01]*)\x01\)\x02(.*)$} $text _ \ Index: openacs-4/packages/xowiki/tcl/form-field-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/form-field-procs.tcl,v diff -u -N -r1.284.2.142 -r1.284.2.143 --- openacs-4/packages/xowiki/tcl/form-field-procs.tcl 1 Feb 2021 09:20:13 -0000 1.284.2.142 +++ openacs-4/packages/xowiki/tcl/form-field-procs.tcl 1 Feb 2021 10:41:29 -0000 1.284.2.143 @@ -395,7 +395,7 @@ # set missing instance vars with defaults :set_instance_vars_defaults } - regsub -all {,\s+} $spec , spec + regsub -all -- {,\s+} $spec , spec foreach s [split $spec ,] { :interprete_single_spec [FormField fc_decode $s] } @@ -695,7 +695,7 @@ # to lowercase such that the result comparison is not case # sensitive. # - set value [string trim [regsub -all {[ ]+} ${:value} " "]] + set value [string trim [regsub -all -- {[ ]+} ${:value} " "]] set firstword [lindex ${:correct_when} 1] if {$firstword eq "-nocase" || [string match "*lower*" $firstword]} { set value [string tolower $value] @@ -1003,7 +1003,7 @@ # Word statistics based on :value. It is assumed here, that the # value is basically a string with whitespace. # - regsub -all {\s} ${:value} " " value + regsub -all -- {\s} ${:value} " " value foreach w [split $value " "] { dict incr :word_statistics [string tolower $w] } @@ -1823,7 +1823,7 @@ fn ${:value} { # Sanitize the filename - regsub -all {\\+} $fn {/} fn ;# fix IE upload path + regsub -all -- {\\+} $fn {/} fn ;# fix IE upload path set fn [ad_file tail $fn] # # Set the value of the two flags in the command below in @@ -2787,7 +2787,7 @@ ${:object} do_substitutions 0 if {[info commands ::apidoc::tclcode_to_html] ne ""} { set html [::apidoc::tclcode_to_html [:value]] - regsub -all "\n?\r" $html html + regsub -all -- "\n?\r" $html html return "
$html
" } else { return "
[string map [list & {&} < {<} > {>}]  [:value]]
" @@ -2966,7 +2966,7 @@ set :widget_type richtext # Mangle the id to make it compatible with jquery; most probably # not optimal and just a temporary solution - regsub -all {[.:]} ${:id} "" id + regsub -all -- {[.:]} ${:id} "" id :id $id } @@ -3155,7 +3155,7 @@ set :widget_type richtext # Mangle the id to make it compatible with jquery; most probably # not optimal and just a temporary solution - regsub -all {[.:-]} ${:id} "" id + regsub -all -- {[.:-]} ${:id} "" id :id $id } @@ -3479,7 +3479,7 @@ ::xo::Page requireJS "/resources/xowiki/wymeditor/plugins/$plugin/jquery.wymeditor.$plugin.js" } } - regsub -all {[.:]} ${:id} {\\\\&} JID + regsub -all -- {[.:]} ${:id} {\\\\&} JID # possible skins are per in the distribution: "default", "sliver", "minimal" and "twopanels" set config [list "skin: '[:skin]'"] @@ -4604,7 +4604,7 @@ # # Provide an HTML ID for ".sortable" compatible with jquery # - regsub -all {[.]} "${:id}.sortable" - jqID + regsub -all -- {[.]} "${:id}.sortable" - jqID set textAreaID ${:id}.text if {![:is_disabled]} { Index: openacs-4/packages/xowiki/tcl/includelet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/includelet-procs.tcl,v diff -u -N -r1.239.2.61 -r1.239.2.62 --- openacs-4/packages/xowiki/tcl/includelet-procs.tcl 24 Jan 2021 19:54:56 -0000 1.239.2.61 +++ openacs-4/packages/xowiki/tcl/includelet-procs.tcl 1 Feb 2021 10:41:29 -0000 1.239.2.62 @@ -129,7 +129,7 @@ } # replace unwanted characters - regsub -all {[^A-Za-z0-9_.-]} $name _ name + regsub -all -- {[^A-Za-z0-9_.-]} $name _ name return $name } @@ -2942,7 +2942,7 @@ foreach o [$pages children] { $o instvar page_order page_id - set level [expr {[regsub -all {[.]} $page_order _ page_order_js] + 1}] + set level [expr {[regsub -all -- {[.]} $page_order _ page_order_js] + 1}] if {$allow_reorder ne ""} { # @@ -2960,7 +2960,7 @@ if {$last_level != $level} { for {set l $last_level} {$l > $level} {incr l -1} {append output "\n" } for {set l $last_level} {$l < $level} {incr l} { - regsub -all {[.]} $prefix _ prefix_js + regsub -all -- {[.]} $prefix _ prefix_js append output [:page_reorder_open_ul -min_level $min_level -ID $ID -prefix_js $prefix_js $l] } set last_level $level Index: openacs-4/packages/xowiki/tcl/menu-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/menu-procs.tcl,v diff -u -N -r1.19.2.12 -r1.19.2.13 --- openacs-4/packages/xowiki/tcl/menu-procs.tcl 6 Dec 2020 11:37:47 -0000 1.19.2.12 +++ openacs-4/packages/xowiki/tcl/menu-procs.tcl 1 Feb 2021 10:41:29 -0000 1.19.2.13 @@ -196,7 +196,7 @@ # # provide a default label # - regsub -all {[.]} $full_name - full_name + regsub -all -- {[.]} $full_name - full_name set item [dict merge [list label "#xowiki.menu-$full_name#" group $group_name] $item] # Index: openacs-4/packages/xowiki/tcl/package-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/package-procs.tcl,v diff -u -N -r1.332.2.69 -r1.332.2.70 --- openacs-4/packages/xowiki/tcl/package-procs.tcl 28 Jan 2021 02:25:10 -0000 1.332.2.69 +++ openacs-4/packages/xowiki/tcl/package-procs.tcl 1 Feb 2021 10:41:29 -0000 1.332.2.70 @@ -189,10 +189,10 @@ ad_log warning "normalize_name receives name '$suffix' containing a colon. A missing -with_prefix?" xo::show_stack } - regsub -all {[\#/\\:]} $suffix _ suffix + regsub -all -- {[\#/\\:]} $suffix _ suffix # if subst_blank_in_name is turned on, turn spaces into _ if {[:get_parameter subst_blank_in_name 1]} { - regsub -all { +} $suffix "_" suffix + regsub -all -- { +} $suffix "_" suffix } return [:join_name -prefix $prefix -name $suffix] } Index: openacs-4/packages/xowiki/tcl/tree-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/tree-procs.tcl,v diff -u -N -r1.23.2.8 -r1.23.2.9 --- openacs-4/packages/xowiki/tcl/tree-procs.tcl 18 Jan 2021 14:01:38 -0000 1.23.2.8 +++ openacs-4/packages/xowiki/tcl/tree-procs.tcl 1 Feb 2021 10:41:29 -0000 1.23.2.9 @@ -103,7 +103,7 @@ if {![regexp {^(.*)[.]([^.]+)} $page_order _ parent]} {set parent ""} set page_number [$owner page_number $page_order $remove_levels] - set level [regsub -all {[.]} [$o set page_order] _ page_order_js] + set level [regsub -all -- {[.]} [$o set page_order] _ page_order_js] if {${:verbose}} {:log "... work on [$o set page_order] level $level full $full"} if {$full || [info exists :open_node($parent)] || [info exists :open_node($page_order)]} { set href [$owner href $book_mode $name] Index: openacs-4/packages/xowiki/tcl/xowiki-form-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-form-procs.tcl,v diff -u -N -r1.147.2.15 -r1.147.2.16 --- openacs-4/packages/xowiki/tcl/xowiki-form-procs.tcl 18 Jan 2021 14:02:53 -0000 1.147.2.15 +++ openacs-4/packages/xowiki/tcl/xowiki-form-procs.tcl 1 Feb 2021 10:41:29 -0000 1.147.2.16 @@ -808,13 +808,13 @@ upvar text text if {$text eq ""} { return 1 } if {[llength $text] != 2} { return 0 } - #regsub -all "­" $text "" text ;# get rid of strange utf-8 characters hex C2AD (Firefox bug?) + #regsub -all -- "­" $text "" text ;# get rid of strange utf-8 characters hex C2AD (Firefox bug?) lassign $text content mime if {$content eq ""} {return 1} #ns_log notice "VALUE='$content'" set clean_content $content - regsub -all "
" $clean_content "" clean_content - regsub -all "" $clean_content "" clean_content + regsub -all -- "
" $clean_content "" clean_content + regsub -all -- "" $clean_content "" clean_content #ns_log notice "--validate_form_content '$content' clean='$clean_content', \ # stripped='[string trim $clean_content]'" if {[string trim $clean_content] eq ""} { set text [list "" $mime]} Index: openacs-4/packages/xowiki/tcl/xowiki-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-procs.tcl,v diff -u -N -r1.542.2.99 -r1.542.2.100 --- openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 18 Jan 2021 14:02:53 -0000 1.542.2.99 +++ openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 1 Feb 2021 10:41:29 -0000 1.542.2.100 @@ -658,7 +658,7 @@ # Replace leading occurrences of the object name (when e.g. procs # are as well exported as separate statements) # - regsub -all {\n::([0-9]+) } $content "\n\\1 " content + regsub -all -- {\n::([0-9]+) } $content "\n\\1 " content } return $content } @@ -2007,7 +2007,7 @@ } else { set map { \" \\\" \[ \\[ \] \\] \$ \\$ \\ \\\\} } - uplevel [list subst [regsub -all $re [string map $map $string] "\[$cmd\]"]] + uplevel [list subst [regsub -all -- $re [string map $map $string] "\[$cmd\]"]] } Page instproc error_during_render {msg} { @@ -2649,8 +2649,8 @@ set l [:regsub_eval $RE(anchor) $l {:anchor "\1"} "1"] set l [:regsub_eval $RE(div) $l {:div "\1"}] set l [:regsub_eval $RE(include) $l {:include_content "\1" "\2"}] - #regsub -all $RE(clean) $l {\1} l - regsub -all $RE(clean2) $l { \1} l + #regsub -all -- $RE(clean) $l {\1} l + regsub -all -- $RE(clean2) $l { \1} l set l [string map $markupmap(unescape) $l] append output $l \n set l "" @@ -2699,7 +2699,7 @@ set current_url [::xo::cc url] set __vars [info vars] - regsub -all [template::adp_variable_regexp] $content {\1@\2;noquote@} content_noquote + regsub -all -- [template::adp_variable_regexp] $content {\1@\2;noquote@} content_noquote #:log "--adp before adp_eval '[template::adp_level]'" set __l [string length $content] @@ -3462,7 +3462,7 @@ set l [:regsub_eval $RE(anchor) $l {:anchor "\1"}] set l [:regsub_eval $RE(div) $l {:div "\1"}] set l [:regsub_eval $RE(include) $l {:include_content "\1" ""}] - #regsub -all $RE(clean) $l {\1} l + #regsub -all -- $RE(clean) $l {\1} l set l [string map $markupmap(unescape) $l] append html $l \n } @@ -3538,16 +3538,16 @@ # Ugly hack to fight against a problem with tDom: asHTML strips # spaces between a and the following " - #regsub -all "/span> \\ \\ \\ \\ \\ \\  \\ \\ \\ \\ \\  \\ \\ \\ \\  \\ \\ \\  \\ \\  \\ \\ \\ \\ \\ \\  \\ \\ \\ \\ \\  \\ \\ \\ \\  \\ \\ \\  \\ \\  " $data "/span>\\ " data - regsub -all " \n
\n\n

" $data "/span>\\ " data + regsub -all -- " \n
\n\n