Eliminated Dangerous Characters |
I've been looking for a way to eliminate suspect characters from my title field in my addpost form. This is because I stupidly built the ID structure around the post title instead of the autonum key. Oh Well. Anyway, I rooted around in regular expressions and found that this does the trick so far. The new line goes right after Here's the new line: <!---<cfset Form.NewTitle = REReplaceNoCase(FORM.Title, "[^a-zA-Z0-9 '()-_?.]", " ", "ALL")>---> Remember to uncomment these lines. You then replace Form.Title with Form.NewTitle in the Select statement. |
Archives