src/hg/inc/jsHelper.h 1.9
1.9 2009/09/10 04:19:26 larrym
make stripRegEx a public function
Index: src/hg/inc/jsHelper.h
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/inc/jsHelper.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -b -B -U 4 -r1.8 -r1.9
--- src/hg/inc/jsHelper.h 17 Dec 2008 21:44:33 -0000 1.8
+++ src/hg/inc/jsHelper.h 10 Sep 2009 04:19:26 -0000 1.9
@@ -14,8 +14,9 @@
#ifndef JSHELPER_H
#define JSHELPER_H
#include "cart.h"
+#include <regex.h>
#define JS_CLEAR_ALL_BUTTON_LABEL "Clear all"
#define JS_SET_ALL_BUTTON_LABEL "Set all"
#define JS_DEFAULTS_BUTTON_LABEL "Set defaults"
@@ -120,5 +121,10 @@
/* Strip out anything that looks like javascript in html string.
This function is designed to cleanup user input (e.g. to avoid XSS attacks).
Returned string should be free'ed after use. */
+char *stripRegEx(char *str, char *regEx, int flags);
+/* Strip out text matching regEx from str.
+ flags is passed through to regcomp as the cflags argument.
+ Returned string should be free'ed after use. */
+
#endif /* JSHELPER_H */