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.1 -r1.2
--- openacs-4/packages/acs-tcl/tcl/text-html-procs.tcl 13 Mar 2001 22:59:27 -0000 1.1
+++ openacs-4/packages/acs-tcl/tcl/text-html-procs.tcl 31 Oct 2001 20:42:07 -0000 1.2
@@ -1142,19 +1142,25 @@
Text to html does ad_text_to_html, and html to text does a ad_html_to_text.
See those procs for details.
+ DRB: Modified this to accept mime types (text/plain or text/html). Simplies things when
+ providing confirmation pages for input destined for the content repository ...
+
@param from specify with html or text what type of text you're providing.
@param to specify what format you want this translated into
@author Lars Pind (lars@pinds.com)
@creation-date 19 July 2000
} {
switch $from {
+ text/html -
html {
switch $to {
+ text/html -
html {
ad_html_security_check $text
return [util_close_html_tags $text]
}
+ text/plain -
text {
return [ad_html_to_text -- $text]
}
@@ -1163,11 +1169,14 @@
}
}
}
+ text/plain -
text {
switch $to {
+ text/html -
html {
return [ad_text_to_html -- $text]
}
+ text/plain -
text {
return [wrap_string $text 70]
}