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.40 -r1.41 --- openacs-4/packages/acs-tcl/tcl/text-html-procs.tcl 29 Jun 2004 10:17:44 -0000 1.40 +++ openacs-4/packages/acs-tcl/tcl/text-html-procs.tcl 12 Jul 2004 11:12:38 -0000 1.41 @@ -790,9 +790,12 @@ set count 0 while 1 { - if { [incr count] > 1000 } { - error "There appears to be a programming bug in ad_html_to_text: We've entered an infinite loop." - } + if {[incr count] > 1000 } { + # JCD: the programming bug is that an unmatched < in the input runs off forever looking for + # it's closing > and in some long text like program listings you can have lots of quotes + # before you find that > + error "There appears to be a programming bug in ad_html_to_text: We've entered an infinite loop." + } # Find the positions of the first quote, apostrophe and greater-than sign. set quote_idx [string first \" $html $i] set apostrophe_idx [string first ' $html $i]