What exactly are you trying to do?  Are you worried about people entering
html into the form fields and having that saved to the database?  If so,
Django's ORM escapes this for you when saving to the DB.  you can use
jQuery's ajax functions to submit the form, and do normal form validation
with newforms and it will be escaped when saving to the DB.  If there is
something else you are concerned about or trying to do,  a bit more
information may result in better responses.
hth,
-richard


On 6/16/08, Knifa <[EMAIL PROTECTED]> wrote:
>
>
> Err, nevermind that actually. It didn't seem to work.
>
> By escaping I mean like turning < into &gt; and > into &lt; etc like
> the "escape" filter does.
>
> On Jun 16, 5:22 pm, Knifa <[EMAIL PROTECTED]> wrote:
> > Oh damn, I should have probably looked around a bit more, heh. I'm not
> > really used to JS yet.
> >
> > Thanks very much!
> >
> > On Jun 16, 5:09 pm, joshuajonah <[EMAIL PROTECTED]> wrote:
> >
> > > I'm not really catching what you're doing here. You want to escape
> > > html with javascript? Just use escape()
> >
> > > On Jun 16, 11:31 am, Knifa <[EMAIL PROTECTED]> wrote:
> >
> > > > Hello there.
> >
> > > > I'm using Serialization with JSON to pass data to jQuery. Everything
> > > > is working fine, except that the data for the fields of my model are
> > > > not escaped, allowing people to use HTML on my app. There isn't a
> > > > function as such in jQuery to do this (and I'm unsure if there is a
> > > > built in Javascript one) so I'm assuming I have to do this serverside
> > > > some how but i'm not really sure what to do.
> >
> > > > Any ideas would be greatly appreciated.
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to