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.58 -r1.59 --- openacs-4/packages/acs-tcl/tcl/text-html-procs.tcl 5 Aug 2008 16:33:29 -0000 1.58 +++ openacs-4/packages/acs-tcl/tcl/text-html-procs.tcl 21 Aug 2008 11:09:06 -0000 1.59 @@ -107,7 +107,11 @@ # Convert line breaks if { !$no_lines_p } { - set text [util_convert_line_breaks_to_html -includes_html $includes_html_p -- $text] + if { $includes_html_p } { + set text [util_convert_line_breaks_to_html -includes_html -- $text] + } else { + set text [util_convert_line_breaks_to_html -- $text] + } } if { !$no_quote_p } { @@ -156,7 +160,7 @@ regsub -all {[ \t]*\n} $text "\n" text # Wrap P's around paragraphs - regsub -all {([^\n\s])\n\n([^\n\s])} $text {\1

\2} text + regsub -all {([^\n\s])\n\n([^\n\s])} $text {\1

\2} text # Convert _single_ CRLF's to
's to preserve line breaks # Lars: This must be done after we've made P tags, because otherwise the line @@ -175,12 +179,6 @@ # Add line breaks to P tags regsub -all {

} $text "

\n" text - # Last

tag - set idx [string last "

" [string tolower $text]] - if { $idx != -1 } { - set text "[string range $text 0 [expr {$idx-1}]]

[string range $text [expr {$idx+3}] end]" - } - return $text }