From: Art Cancro Date: Mon, 31 May 2004 15:54:13 +0000 (+0000) Subject: * "text" and "HTML" options for message entry. X-Git-Tag: v7.86~5420 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=ca11c749d4612346979637067a46cef13a60f42b;p=citadel.git * "text" and "HTML" options for message entry. --- diff --git a/webcit/ChangeLog b/webcit/ChangeLog index 07c87a9c3..fbd4e47fe 100644 --- a/webcit/ChangeLog +++ b/webcit/ChangeLog @@ -1,4 +1,7 @@ $Log$ +Revision 510.4 2004/05/31 15:54:13 ajc +* "text" and "HTML" options for message entry. + Revision 510.3 2004/05/29 03:31:48 ajc * tighten up the space between icons in the iconbar @@ -1818,4 +1821,3 @@ Sun Dec 6 19:50:55 EST 1998 Art Cancro 1998-12-03 Nathan Bryant * webserver.c: warning fix - diff --git a/webcit/messages.c b/webcit/messages.c index 0cd6bc47f..7f373d2f8 100644 --- a/webcit/messages.c +++ b/webcit/messages.c @@ -1293,6 +1293,11 @@ void post_mime_to_server(void) { struct wc_attachment *att; char *encoded; size_t encoded_length; + int is_html = 0; + + if (!strcasecmp(bstr("msg_format"), "html")) { + is_html = 1; + } /* If there are attachments, we have to do multipart/mixed */ if (WC->first_attachment != NULL) { @@ -1315,7 +1320,15 @@ void post_mime_to_server(void) { serv_puts("Content-type: text/html"); serv_puts(""); - text_to_server(bstr("msgtext"), 1); + serv_puts("\n"); + if (is_html) { + text_to_server(bstr("msgtext"), 0); + } + else { + text_to_server(bstr("msgtext"), 1); + } + serv_puts("\n"); + if (is_multipart) { @@ -1494,8 +1507,18 @@ void display_enter(void) "" - "   " - "" + " " + ); + + wprintf("text \n"); + + wprintf("HTML \n"); + + wprintf("" "
\n"); wprintf("