ccfbdd7909fa1514365a2a2294aca4094653d816 jcasper Thu Jun 22 11:37:23 2017 -0700 Adding htmlTextStripJavascriptCssAndTags as a library function following code review, refs #19645 diff --git src/inc/htmshell.h src/inc/htmshell.h index 2a91dc7..db1966a 100644 --- src/inc/htmshell.h +++ src/inc/htmshell.h @@ -51,30 +51,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 *htmlTextStripJavascriptCssAndTags(char *s); +/* Returns a cloned string with all inline javascript, css, and 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 *htmlEncode(char *s); /* Returns a cloned string with quotes replaced by html codes. Changes ',",\n and >,<,& to code equivalents. This differs from cgiEncode as it handles text that will be displayed in an html page or tooltip style title. */ char *attributeEncode(char *s); // encode double and single quotes in a string to be used as an element attribute void attributeDecode(char *s); /* For html tag attribute values decode html entities &#xHH; */