* fix trailing string appending in URLIZING for plaintext.
[citadel.git] / webcit / html2html.c
index e331cda67cc21f04347124d8399c9846b7601cf0..a91239d0a1a2fce03f64bae5b304cadd791b7277 100644 (file)
@@ -542,7 +542,7 @@ void UrlizeText(StrBuf* Target, StrBuf *Source, StrBuf *WrkBuf)
                           LB, QU, ChrPtr(WrkBuf), QU, QU, TARGET, 
                           QU, RB, ChrPtr(WrkBuf), LB, RB);
 
-       TrailerLen = len - (end - start);
+       TrailerLen = StrLength(Source) - (end - ChrPtr(Source));
        if (TrailerLen > 0)
                StrBufAppendBufPlain(Target, end, TrailerLen, 0);
 }