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 -r1.47.2.1 -r1.47.2.2
--- openacs-4/packages/acs-tcl/tcl/text-html-procs.tcl 14 Dec 2006 13:55:10 -0000 1.47.2.1
+++ openacs-4/packages/acs-tcl/tcl/text-html-procs.tcl 16 Jul 2007 01:02:19 -0000 1.47.2.2
@@ -1233,6 +1233,10 @@
[0-9] {
regexp -indices -start [expr $i+2] {[0-9]*} $html dec_idx
set dec [string range $html [lindex $dec_idx 0] [lindex $dec_idx 1]]
+ # $dec might contain leading 0s. Since format evaluates $dec as expr
+ # leading 0s cause octal interpretation and therefore errors on e.g. &
+ set dec [string trimleft $dec 0]
+ if {$dec eq ""} {set dec 0}
set html [string replace $html $i [lindex $dec_idx 1] \
[format "%c" $dec]]
set match_p 1