X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fhtml2html.c;h=289a7e51f8aff421c4eb15022d46408aa683d8c2;hb=437c6ded80e7f56d88e7fd4f1cda067cf3360551;hp=c1c2b64a55a8283b87d92b939a6cb7c5cd114ecc;hpb=49d980b0a0c582cc59ad7843143b1f4dbf58740c;p=citadel.git diff --git a/webcit/html2html.c b/webcit/html2html.c index c1c2b64a5..289a7e51f 100644 --- a/webcit/html2html.c +++ b/webcit/html2html.c @@ -502,10 +502,10 @@ void output_html(const char *supplied_charset, int treat_as_wiki, int msgnum, St * so we don't turn things that look like URL's into * links, when they're already links - or image sources. */ - if (*(ptr-1) == '<') { + if ((ptr > msg) && (*(ptr-1) == '<')) { ++brak; } - if (*(ptr-1) == '>') { + if ((ptr > msg) && (*(ptr-1) == '>')) { --brak; if ((scriptlevel == 0) && (script_start_pos >= 0)) { StrBufCutRight(converted_msg, StrLength(converted_msg) - script_start_pos);