Index: openacs-4/packages/dotlrn-ecommerce/tcl/dotlrn-ecommerce-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/tcl/dotlrn-ecommerce-procs.tcl,v diff -u -N -r1.5 -r1.6 --- openacs-4/packages/dotlrn-ecommerce/tcl/dotlrn-ecommerce-procs.tcl 25 Aug 2005 19:07:48 -0000 1.5 +++ openacs-4/packages/dotlrn-ecommerce/tcl/dotlrn-ecommerce-procs.tcl 31 Aug 2005 02:11:30 -0000 1.6 @@ -11,6 +11,7 @@ } namespace eval dotlrn_ecommerce {} +namespace eval dotlrn_ecommerce::util {} ad_proc -public dotlrn_ecommerce::notify_admins_of_waitlist { } { @@ -152,4 +153,18 @@ dotlrn_ecommerce::check_expired_orders ad_schedule_proc -thread t 600 dotlrn_ecommerce::check_expired_orders -} \ No newline at end of file +} + +ad_proc -public dotlrn_ecommerce::util::text_to_html { + {-text:required} +} { + @author Deds Castillo (deds@i-manila.com.ph) + @creation-date 2005-08-11 +} { + set html_comment [ad_text_to_html -no_lines $text] + regsub -all {\r\n} $html_comment "\n" html_comment + regsub -all {\r} $html_comment "\n" html_comment + regsub -all {([^\n\s])\n\n([^\n\s])} $html_comment {\1

\2} html_comment + regsub -all {\n} $html_comment "
\n" html_comment + return $html_comment +}