Python escape usage in django templates by GAE
Niklasro
niklasro at gmail.com
Thu Mar 3 02:50:03 EST 2011
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"))
And the output is strange. View source show this:
<ul><li><a href="ai">Add</a></li><li><a href="li">03 Mar</a></li>
<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>
</ul>
Can you make ad advice how to proceed? Many thanks,
Niklas Rosenrantz
More information about the Python-list
mailing list