Is there a reason why you can't use Form.is_valid()? It's pretty nice. http://docs.djangoproject.com/en/dev/ref/forms/api/#accessing-clean-data
Example: http://gist.github.com/311192 On Sat, Feb 20, 2010 at 11:25 AM, Jon Loeliger <j...@jdl.com> wrote: > > Folks, > > A few days ago I asked: > > > Is there a canonical definition or even a reference > > implementation of a slug = slugify(str) function somewhere? > > Thanks for taking the time to answer that for me! We pretty much > beat the answer into my thick skull: Use the slugify() function > as per "from django.template.defaultfilters import slugify". > > > What about my second question from earlier?: > > > Is there a standard clean_user_input() that accepts direct user > > input from a form text field and de-gunks it so that it is later > > acceptable to be re-emitted as HTML formatted data without worry > > of hacking issues? I am looking form something more clever than > > simply validating the user's input to conform to "is a number" or > > "is a text field" sorts of thing. I'm specifically looking for a > > function that strips out embedded scripting, SQL, HTML, etc hackery. > > Sure, I'd then like to use it to verify clean form input of course. > > How do people ensure safe user input from their forms? > > Thanks, > jdl > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.