> Hi dear group, could you comment on the following I'd very much
> appreciate the knowledge:
>
>
>
> > Hi
> > I got problems with escape displaying like junk when upgrading from
> > django 0.96 to 1.2 with google app engine.
> > The code is
>
> > # let user choose authenticator
> > for p in openIdProviders:
> > p_name = p.split('.')[0] # take "AOL" from "AOL.com"
> > p_url = p.lower() # "AOL.com" -> "aol.com"
> > loginmsg = loginmsg + '<a href="%s">%s</a> ' % ( #'','')
> > users.create_login_url(federated_identity=p_url),
> > p_name)
> > loginmsg = loginmsg + '<a href=\"%s\">%s</a>' %
> > ('login',_("Log in"))
Slightly OT but I wouldnt' build html this way in Django. We do have
templates, don't we ?-)
> > And the output is strange. View source show this:
>
> > <li>Log in<a href="google.com">Google</a> <a
> > href="google.com">Yahoo</a> <a
> > href="google.com">MySpace</a> <a
> > href="google.com">AOL</a> <a
> > href="login">Log in</a></li>
http://docs.djangoproject.com/en/1.2/releases/1.0-porting-guide/#learn-to-love-autoescaping
I strongly suggest you read the whole page FWIW.
--
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 django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment