/*
* Functions which deal with the fetching and displaying of messages.
*
- * Copyright (c) 1996-2012 by the citadel.org team
+ * Copyright (c) 1996-2018 by the citadel.org team
*
* This program is open source software. You can redistribute it and/or
* modify it under the terms of the GNU General Public License, version 3.
serv_printf("\n--%s", alt_boundary);
}
- if (havebstr("markdown"))
- {
- serv_puts("Content-type: text/x-markdown; charset=utf-8");
- serv_puts("Content-Transfer-Encoding: quoted-printable");
- serv_puts("");
- text_to_server_qp(sbstr("msgtext")); /* Transmit message in quoted-printable encoding */
- }
- else
- {
- serv_puts("Content-type: text/html; charset=utf-8");
- serv_puts("Content-Transfer-Encoding: quoted-printable");
- serv_puts("");
- serv_puts("<html><body>\r\n");
- text_to_server_qp(sbstr("msgtext")); /* Transmit message in quoted-printable encoding */
- serv_puts("</body></html>\r\n");
- }
+ serv_puts("Content-type: text/html; charset=utf-8");
+ serv_puts("Content-Transfer-Encoding: quoted-printable");
+ serv_puts("");
+ serv_puts("<html><body>\r\n");
+ text_to_server_qp(sbstr("msgtext")); /* Transmit message in quoted-printable encoding */
+ serv_puts("</body></html>\r\n");
if (include_text_alt) {
serv_printf("--%s--", alt_boundary);
StrBuf *Recp = NULL;
StrBuf *Cc = NULL;
StrBuf *Bcc = NULL;
- char *wikipage = NULL;
+ StrBuf *wikipage = NULL;
const StrBuf *my_email_addr = NULL;
StrBuf *CmdBuf = NULL;
StrBuf *references = NULL;
FreeStrBuf(&EmailAddress);
FreeStrBuf(&EncBuf);
- wikipage = strdup(bstr("page"));
+ wikipage = NewStrBufDup(sbstr("page"));
str_wiki_index(wikipage);
my_email_addr = sbstr("my_email_addr");
StrLength(encoded_subject) +
StrLength(Cc) +
StrLength(Bcc) +
- strlen(wikipage) +
+ StrLength(wikipage) +
StrLength(my_email_addr) +
StrLength(references);
CmdBuf = NewStrBufPlain(NULL, sizeof (CMD) + HeaderLen);
ChrPtr(display_name),
saving_to_drafts?"":ChrPtr(Cc),
saving_to_drafts?"":ChrPtr(Bcc),
- wikipage,
+ ChrPtr(wikipage),
ChrPtr(my_email_addr),
ChrPtr(references));
FreeStrBuf(&references);
int i = 0;
long replying_to;
- int prefer_md;
-
- get_pref_yesno("markdown", &prefer_md, 0);
-
if (havebstr("force_room")) {
gotoroom(sbstr("force_room"));
}
const StrBuf *Recp = NULL;
const StrBuf *Cc = NULL;
const StrBuf *Bcc = NULL;
- char *wikipage = NULL;
+ StrBuf *wikipage = NULL;
StrBuf *CmdBuf = NULL;
const char CMD[] = "ENT0 0|%s|%d|0||%s||%s|%s|%s";
Recp = sbstr("recp");
Cc = sbstr("cc");
Bcc = sbstr("bcc");
- wikipage = strdup(bstr("page"));
+ wikipage = NewStrBufDup(sbstr("page"));
str_wiki_index(wikipage);
CmdBuf = NewStrBufPlain(NULL,
StrLength(display_name) +
StrLength(Cc) +
StrLength(Bcc) +
- strlen(wikipage));
+ StrLength(wikipage));
StrBufPrintf(CmdBuf,
CMD,
ChrPtr(display_name),
ChrPtr(Cc),
ChrPtr(Bcc),
- wikipage
+ ChrPtr(wikipage)
);
serv_puts(ChrPtr(CmdBuf));
StrBuf_ServGetln(CmdBuf);
begin_burst();
output_headers(1, 0, 0, 0, 1, 0);
- if ((WCC->CurRoom.defview == VIEW_WIKIMD) || prefer_md)
- DoTemplate(HKEY("edit_markdown_epic"), NULL, &NoCtx);
- else
- DoTemplate(HKEY("edit_message"), NULL, &NoCtx);
+ DoTemplate(HKEY("edit_message"), NULL, &NoCtx);
end_burst();
return;
PRF_STRING,
NULL);
RegisterPreference("mailbox",_("Mailbox view mode"), PRF_STRING, NULL);
- RegisterPreference("markdown",_("Prefer markdown editing"), PRF_YESNO, NULL);
-
WebcitAddUrlHandler(HKEY("readnew"), "", 0, h_readnew, ANONYMOUS|NEED_URL);
WebcitAddUrlHandler(HKEY("readold"), "", 0, h_readold, ANONYMOUS|NEED_URL);