Index: openacs-4/packages/captcha/tcl/captcha-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/captcha/tcl/Attic/captcha-procs.tcl,v diff -u -N -r1.1.2.9 -r1.1.2.10 --- openacs-4/packages/captcha/tcl/captcha-procs.tcl 1 Mar 2024 13:21:11 -0000 1.1.2.9 +++ openacs-4/packages/captcha/tcl/captcha-procs.tcl 1 Mar 2024 14:42:36 -0000 1.1.2.10 @@ -336,9 +336,16 @@ # First line starts at y=0, while subsequent are "1.2 # font-size" below. # + + set line [ns_quotehtml ${line}] + # + # Safari also needs spaces to be quoted. Other browsers or + # software like Inkscape do not seem to mind... + # + regsub -all { } $line {\ } line set y [expr {$i == 0 ? "y=\"0\"" : "dy=\"1.2em\""}] append svg [subst { - [ns_quotehtml ${line}] + $line }] if {[string length $line] > $max_length} { set max_length [string length $line] @@ -350,7 +357,7 @@ # Empirical formula to compute the optimal length, found to work # in practice. # - set svg_width [expr {11 * $max_length}] + set svg_width [expr {4 * $max_length}] set svg_height [expr {15 * [llength $lines]}] @@ -453,7 +460,7 @@ id="$captcha_checksum_id" name="$captcha_checksum_id" value="$checksum"> -
$svg
+
$svg
[input text element $tag_attributes]
}] }