From 0b3ffb13172c211eed561288d0fd04d76506bb02 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Wed, 19 May 2010 20:46:43 +0100 Subject: Setting the HTML flag on a connection has a nasty side effect of escaping a lot of "special" characters, and these HTML entities are not counted as one character. :-( So just strip HTML of incoming stuff and don't do anything with what goes out. It's not required. The story may actually be more complicated this, let's find out. --- lib/misc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib/misc.c') diff --git a/lib/misc.c b/lib/misc.c index c56b31f3..d77972e3 100644 --- a/lib/misc.c +++ b/lib/misc.c @@ -153,11 +153,11 @@ static const htmlentity_t ent[] = void strip_html( char *in ) { char *start = in; - char *out = g_malloc( strlen( in ) + 1 ); + char out[strlen(in)+1]; char *s = out, *cs; int i, matched; - memset( out, 0, strlen( in ) + 1 ); + memset( out, 0, sizeof( out ) ); while( *in ) { @@ -219,7 +219,6 @@ void strip_html( char *in ) } strcpy( start, out ); - g_free( out ); } char *escape_html( const char *html ) -- cgit v1.2.3