d79829e04a7d00dbe363675013dccb3527c3dc64 larrym Tue Nov 15 11:53:05 2011 -0800 add htmlTextReplaceTagsWithChar diff --git src/inc/htmshell.h src/inc/htmshell.h index 8c68ee3..80fcbec 100644 --- src/inc/htmshell.h +++ src/inc/htmshell.h @@ -32,30 +32,33 @@ void htmlNbSpaces(int count); /* Print a number of non-breaking spaces. */ void htmHorizontalLine(FILE *f); /* Print a horizontal line. */ void htmTextOut(FILE *f, char *s); /* Print out string to file, if necessary replacing > with > and the like */ void htmlTextOut(char *s); /* Print out string, if necessary replacing > with > and the like */ char *htmlTextStripTags(char *s); /* Returns a cloned string with all html tags stripped out */ +char *htmlTextReplaceTagsWithChar(char *s, char ch); +/* Returns a cloned string with all html tags replaced with given char (useful for tokenizing) */ + 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) char *attributeEncode(char *str); // encode double and single quotes in a string to be used as an element attribute void htmlMemDeath(); /* Complain about lack of memory and abort. */ void htmlStart(char *title); /* Write the start of a cgi-generated html file */