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 -r1.70 -r1.71
--- openacs-4/packages/xotcl-core/tcl/30-widget-procs.tcl 30 Jan 2019 20:27:48 -0000 1.70
+++ openacs-4/packages/xotcl-core/tcl/30-widget-procs.tcl 3 Sep 2024 15:37:54 -0000 1.71
@@ -12,16 +12,13 @@
}
Object instproc asHTML {{-master defaultMaster} -page:switch} {
- require_html_procs
+ ::xo::require_html_procs
dom createDocument html doc
set root [$doc documentElement]
if {!$page} {
$root appendFromScript {:render}
- set n [$root childNode]
- if {$n eq ""} {
- return ""
- }
- return [$n asHTML]
+ set nodes [$root childNode]
+ return [join [lmap n $nodes {$n asHTML}] \n]
} else {
set slave [$master decorate $root]
$slave appendFromScript {:render}
@@ -33,7 +30,7 @@
#
# Define Widget classes with localization
#
-# Most importantly, we define ::xo::Table, somewhat similar to the classical multirow
+# Most importantly, we define ::xo::Table, somewhat similar to the classical multirow
namespace eval ::xo {}
namespace eval ::xo::tdom {
@@ -145,7 +142,7 @@
} else {
set HTMLattribute $attribute
}
- #:msg "[:name] check for $attribute => [info exists :$attribute]"
+ #:msg "${:name} check for $attribute => [info exists :$attribute]"
if {[info exists :$attribute]} {
lappend pairs $HTMLattribute [set :$attribute]
}
@@ -169,14 +166,14 @@
} else {
set HTMLattribute $attribute
}
- #:msg "[:name] check for $attribute => [info exists :$attribute]"
+ #:msg "${:name} check for $attribute => [info exists :$attribute]"
if {[:uplevel [list info exists $attribute]]} {
lappend pairs $HTMLattribute [:uplevel [list set $attribute]]
}
}
return $pairs
}
-
+
#
# ::xo::tdom::Object
# is the top of the class hierarchies for tDOM objects
@@ -229,9 +226,9 @@
regsub -all \x01# $text "#" text
return $text
}
-
+
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 +250,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 {(]*>)} $text {\2\1\3} text
-
- while { [regsub -all -nocase {(