956de2a314de3a97578e024e824e0e7879cbaf12 larrym Tue Nov 8 16:35:37 2011 -0800 add attributeEncode diff --git src/inc/htmshell.h src/inc/htmshell.h index 6ee39c4..8c68ee3 100644 --- src/inc/htmshell.h +++ src/inc/htmshell.h @@ -39,30 +39,33 @@ /* 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 *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 */ void htmStart(FILE *f, char *title); /* Write the start of a stand alone .html file. */ void htmStartWithHead(FILE *f, char *head, char *title); /* Write the start of a stand alone .html file, plus head info */ void htmStartDirDepth(FILE *f, char *title, int dirDepth); /* Write the start of a stand alone .html file. dirDepth is the number of levels * beneath apache root that caller's HTML will appear to the web client.