X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fmsg_renderers.c;h=d3a7c423f2b86bef184cee2fb329365607b8ce79;hb=4979a34ac506540f12389a7ae42d64085636be3b;hp=03b8191525a59ec1cad975e9328525a2d3d4f31b;hpb=9d88f4e66830ad2c4291d523254dfc499031d85c;p=citadel.git diff --git a/webcit/msg_renderers.c b/webcit/msg_renderers.c index 03b819152..d3a7c423f 100644 --- a/webcit/msg_renderers.c +++ b/webcit/msg_renderers.c @@ -1208,7 +1208,23 @@ int ParseMessageListHeaders_Detail(StrBuf *Line, */ StrBufSkip_NTokenS(Line, pos, '|', 1); Msg->subj = NewStrBufPlain(NULL, StrLength(Line)); + + FlushStrBuf(ConversionBuffer); + /* we assume the subject is the last parameter inside of the list; + * thus we don't use the tokenizer to fetch it, since it will hick up + * on tokenizer chars inside of the subjects StrBufExtract_NextToken(ConversionBuffer, Line, pos, '|'); + */ + if (*pos != StrBufNOTNULL) { + StrBufPlain(ConversionBuffer, *pos, + StrLength(Line) - (*pos - ChrPtr(Line))); + *pos = StrBufNOTNULL; + if ((StrLength(ConversionBuffer) > 0) && + (*(ChrPtr(ConversionBuffer) + + StrLength(ConversionBuffer) - 1) == '|')) + StrBufCutRight(ConversionBuffer, 1); + } + if (StrLength(ConversionBuffer) == 0) StrBufAppendBufPlain(Msg->subj, _("(no subject)"), -1,0); else {