f60abda45cb49359266843c7bbfbafe2a2bf2051 tdreszer Thu Jul 22 13:02:08 2010 -0700 Extended htmlEncode to handle single quotes properly diff --git src/inc/htmshell.h src/inc/htmshell.h index 605ce27..cd92119 100644 --- src/inc/htmshell.h +++ src/inc/htmshell.h @@ -41,8 +41,12 @@ void htmlTextOut(char *s); /* Print out string, if necessary replacing > with > and the like */ -char *htmlEncode(char *s); -/* Return a clone of s but if necessary replacing > with > and the like */ +char *htmlEncodeText(char *s, boolean tagsOkay); +/* Returns a cloned string with quotes replaced by html codes. + Changes ',",\n and if not tagsOkay >,<,& to code equivalents. + This differs from cgiEncode as it handles text that will + be displayed in an html page or tooltip style title. */ +#define htmlEncode(s) htmlEncodeText(s,FALSE) void htmlMemDeath(); /* Complain about lack of memory and abort. */