X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fserv_func.c;h=2325d8dbfcc5a9db27c8809d503e4bb6c30f24d8;hb=1cccb1b244f4798c7cbd09cfe2be7c0fc722c0cc;hp=b1c82badbcc497700fb4afafb6fa282ad531a8d3;hpb=2dc3bd8889b4a97d416c99aec9c2b086da06c2d7;p=citadel.git diff --git a/webcit/serv_func.c b/webcit/serv_func.c index b1c82badb..2325d8dbf 100644 --- a/webcit/serv_func.c +++ b/webcit/serv_func.c @@ -186,14 +186,12 @@ void pullquote_fmout(void) { /** * \brief Transmit message text (in memory) to the server. - * \param ptr the output buffer - * \param convert_to_html if set to 1, the message is converted into something - * which kind of resembles HTML. + * + * \param ptr Pointer to the message being transmitted */ -void text_to_server(char *ptr, int convert_to_html) +void text_to_server(char *ptr) { - char buf[SIZ]; - char conv[4]; + char buf[256]; int ch, a, pos; pos = 0; @@ -207,15 +205,7 @@ void text_to_server(char *ptr, int convert_to_html) buf[strlen(buf) - 1] = 0; serv_puts(buf); buf[0] = 0; - if (convert_to_html) { - strcat(buf, "
"); - } - else { - if (ptr[pos] != 0) strcat(buf, " "); - } - } else if ((convert_to_html)&&(strchr("#&;`'|*?-~<>^()[]{}$\\", ch) != NULL)) { - sprintf(conv, "%c", ch); - stresc(&buf[strlen(buf)], conv, 0, 0); + if (ptr[pos] != 0) strcat(buf, " "); } else { a = strlen(buf); buf[a + 1] = 0; @@ -232,7 +222,6 @@ void text_to_server(char *ptr, int convert_to_html) } } serv_puts(buf); - }