X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fhtml2html.c;h=82962daed14417b5187a263bdf688058bad28b13;hb=295bfe2a43c4f0b0d8433454e89af06fc9c4433d;hp=33eeedf01b6172290493d68a51fcad20a5937f4d;hpb=fcb8c4169baa629eb3c1a4979c7c8c32f1560389;p=citadel.git diff --git a/webcit/html2html.c b/webcit/html2html.c index 33eeedf01..82962daed 100644 --- a/webcit/html2html.c +++ b/webcit/html2html.c @@ -2,7 +2,7 @@ * Output an HTML message, modifying it slightly to make sure it plays nice * with the rest of our web framework. * - * Copyright (c) 2005-2010 by the citadel.org team + * Copyright (c) 2005-2011 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 as published by @@ -301,10 +301,10 @@ void output_html(const char *supplied_charset, int treat_as_wiki, int msgnum, St && (strcasecmp(charset, "UTF-8")) && (strcasecmp(charset, "")) ) { - lprintf(9, "Converting %s to UTF-8\n", charset); + syslog(9, "Converting %s to UTF-8\n", charset); ctdl_iconv_open("UTF-8", charset, &ic); if (ic == (iconv_t)(-1) ) { - lprintf(5, "%s:%d iconv_open() failed: %s\n", + syslog(5, "%s:%d iconv_open() failed: %s\n", __FILE__, __LINE__, strerror(errno)); } } @@ -393,7 +393,12 @@ void output_html(const char *supplied_charset, int treat_as_wiki, int msgnum, St StrBufAppendPrintf(converted_msg, new_window); ptr = &ptr[8]; } - else if ( (treat_as_wiki) && (strncasecmp(ptr, " bufsize) { - lprintf(1, "URL: content longer than buffer!"); + syslog(1, "URL: content longer than buffer!"); return; } end = buf + len; @@ -675,7 +680,7 @@ void url(char *buf, size_t bufsize) UrlLen = end - start; if (UrlLen > sizeof(urlbuf)){ - lprintf(1, "URL: content longer than buffer!"); + syslog(1, "URL: content longer than buffer!"); return; } memcpy(urlbuf, start, UrlLen); @@ -688,7 +693,7 @@ void url(char *buf, size_t bufsize) "%ca href=%c%s%c TARGET=%c%s%c%c%s%c/A%c", LB, QU, urlbuf, QU, QU, TARGET, QU, RB, urlbuf, LB, RB); if (outpos >= sizeof(outbuf) - Offset) { - lprintf(1, "URL: content longer than buffer!"); + syslog(1, "URL: content longer than buffer!"); return; } @@ -696,7 +701,7 @@ void url(char *buf, size_t bufsize) if (TrailerLen > 0) memcpy(outbuf + Offset + outpos, end, TrailerLen); if (Offset + outpos + TrailerLen > bufsize) { - lprintf(1, "URL: content longer than buffer!"); + syslog(1, "URL: content longer than buffer!"); return; } memcpy (buf, outbuf, Offset + outpos + TrailerLen);