// Any of these tags cause everything up to and including
// the tag to be removed.
- if ((!strncasecmp(ptr, "HTML", 4))
- || (!strncasecmp(ptr, "HEAD", 4))
- || (!strncasecmp(ptr, "/HEAD", 5))
- || (!strncasecmp(ptr, "BODY", 4))) {
+ if ( (!strncasecmp(ptr, "HTML", 4))
+ || (!strncasecmp(ptr, "HEAD", 4))
+ || (!strncasecmp(ptr, "/HEAD", 5))
+ || (!strncasecmp(ptr, "BODY", 4))
+ ) {
char *pBody = NULL;
if (!strncasecmp(ptr, "BODY", 4)) {
converted_msg = NewStrBufPlain(NULL, content_length + 8192);
// Convert foreign character sets to UTF-8 if necessary
- if ((strcasecmp(charset, "us-ascii"))
- && (strcasecmp(charset, "UTF-8"))
- && (strcasecmp(charset, ""))
- ) {
+ if ( (strcasecmp(charset, "us-ascii"))
+ && (strcasecmp(charset, "UTF-8"))
+ && (strcasecmp(charset, ""))
+ ) {
syslog(LOG_DEBUG, "Converting %s to UTF-8", charset);
ctdl_iconv_open("UTF-8", charset, &ic);
if (ic == (iconv_t) (-1)) {
ptr = &ptr[8];
}
else if ((treat_as_wiki)
- && (strncasecmp(ptr, "<a href=\"wiki?", 14))
- && (strncasecmp(ptr, "<a href=\"dotgoto?", 17))
- && (strncasecmp(ptr, "<a href=\"knrooms?", 17))
- ) {
+ && (strncasecmp(ptr, "<a href=\"wiki?", 14))
+ && (strncasecmp(ptr, "<a href=\"dotgoto?", 17))
+ && (strncasecmp(ptr, "<a href=\"knrooms?", 17))
+ ) {
content_length += 64;
StrBufAppendPrintf(converted_msg, "<a href=\"wiki?go=");
//StrBufUrlescAppend(converted_msg, "FIXME ROOM NAME", NULL); // FIXME make compatible with webcit-ng
src = strstr(ptr, "src=\"cid:");
++brak;
- if (src && isspace(*(src - 1))
- && tag_end && (cid_start = strchr(src, ':'))
- && (cid_end = strchr(cid_start, '"'))
- && (cid_end < tag_end)
- ) {
+ if ( src
+ && isspace(*(src - 1))
+ && tag_end && (cid_start = strchr(src, ':'))
+ && (cid_end = strchr(cid_start, '"'))
+ && (cid_end < tag_end)
+ ) {
// copy tag and attributes up to src="cid:
StrBufAppendBufPlain(converted_msg, ptr, src - ptr, 0);
cid_start++;
strlenptr = strlen(ptr);
for (i = 0; i <= strlenptr; ++i) {
- if ((ptr[i] == 0)
- || (isspace(ptr[i]))
- || (ptr[i] == 10)
- || (ptr[i] == 13)
- || (ptr[i] == '(')
- || (ptr[i] == ')')
- || (ptr[i] == '<')
- || (ptr[i] == '>')
- || (ptr[i] == '[')
- || (ptr[i] == ']')
- || (ptr[i] == '"')
- || (ptr[i] == '\'')
- )
+ if ( (ptr[i] == 0)
+ || (isspace(ptr[i]))
+ || (ptr[i] == 10)
+ || (ptr[i] == 13)
+ || (ptr[i] == '(')
+ || (ptr[i] == ')')
+ || (ptr[i] == '<')
+ || (ptr[i] == '>')
+ || (ptr[i] == '[')
+ || (ptr[i] == ']')
+ || (ptr[i] == '"')
+ || (ptr[i] == '\'')
+ ) {
linklen = i;
+ }
// entity tag?
if (ptr[i] == '&') {
if ((ptr[i + 2] == ';') ||