From 9ca7c88d7c56b4bdbf2380ffeb663d700404ea35 Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Wed, 11 May 2016 18:13:26 -0400 Subject: Modifications to butcomment so it can accept newlines --- ws2a/bugcomment.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'ws2a/bugcomment.c') diff --git a/ws2a/bugcomment.c b/ws2a/bugcomment.c index eeba8fe..6464314 100644 --- a/ws2a/bugcomment.c +++ b/ws2a/bugcomment.c @@ -24,6 +24,14 @@ char* replaceHTML(char* str){ int hex; sscanf(str+strp,"%%%x",&hex); //printf("Was:%c\n",(char)hex); + if(hex == 0x0D) continue; + if(hex == 0x0A){ + nstr[nstrp] = '\\'; + nstr[nstrp+1] = 'n'; + nstrp+=2; + strp++; + continue; + } nstr[nstrp] = (char)hex; nstrp++; strp+=3; -- cgit v1.2.3-70-g09d2