Index: openacs-4/packages/captcha/tcl/captcha-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/captcha/tcl/captcha-procs.tcl,v diff -u -r1.1.2.10 -r1.1.2.11 --- openacs-4/packages/captcha/tcl/captcha-procs.tcl 1 Mar 2024 14:42:36 -0000 1.1.2.10 +++ openacs-4/packages/captcha/tcl/captcha-procs.tcl 1 Mar 2024 14:54:56 -0000 1.1.2.11 @@ -337,6 +337,10 @@ # font-size" below. # + if {[string length $line] > $max_length} { + set max_length [string length $line] + } + set line [ns_quotehtml ${line}] # # Safari also needs spaces to be quoted. Other browsers or @@ -347,18 +351,14 @@ append svg [subst { $line }] - if {[string length $line] > $max_length} { - set max_length [string length $line] - } incr i } # - # Empirical formula to compute the optimal length, found to work - # in practice. + # Empirical formula to compute the optimal viewBox size, found to + # work in practice. # - set svg_width [expr {4 * $max_length}] - + set svg_width [expr {11 * $max_length}] set svg_height [expr {15 * [llength $lines]}] set svg [subst -nocommands {