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.109.2.29 -r1.109.2.30 --- openacs-4/packages/acs-tcl/tcl/text-html-procs.tcl 8 Jul 2022 13:46:43 -0000 1.109.2.29 +++ openacs-4/packages/acs-tcl/tcl/text-html-procs.tcl 25 Aug 2022 11:44:46 -0000 1.109.2.30 @@ -169,7 +169,7 @@ foreach ch $myChars entity $myHTML { lappend map $ch $entity } - set text [string map $map $text] + set text [string map $map $text] } # Convert lines starting with a ">" into blockquotes. @@ -309,10 +309,11 @@ # Wrap P's around paragraphs regsub -all -- {([^\n\s])\n\n+([^\n\s])} $text {\1
\2} text
- # remove line breaks right before and after HTML tags that will insert a paragraph break themselves
+ # Remove line breaks right before and after HTML tags that will
+ # insert a paragraph break themselves.
if { $includes_html_p } {
set tags [join { ul ol li blockquote p div table tr td th } |]
- regsub -all -nocase "\\s*(?($tags)\\s*\[^>\]*>)\\s*" $text {\1} text
+ regsub -all -nocase "\[\r\n\]*(?($tags)\[\r\n\]*\[^>\]*>)\[\r\n\]*" $text {\1} text
}
# Convert _single_ CRLF's to
's to preserve line breaks