In blog demo, the _() not works as expect #726

Closed
zhkzyth opened this Issue Apr 13, 2013 · 1 comment

Projects

None yet

2 participants

@zhkzyth

Hi, i try to run the blog demo, but got some srange output from _ function.

{{ _('<a href="%(url)s">Sign in</a> to compose/edit') % {"url": "/auth/login?next=" + url_escape(request.uri)} }}

After the translate, the a tag and other entities were escaped.Is this a bug, or it is the duty for the developer use js to render it correctly?

@bdarnell
tornadoweb member

This is a bug in the demo. It has to do with autoescaping instead of the _() function: this expression should use {% raw _(...) %} instead of {{ _(...) }} so the tags don't get escaped.

@bdarnell bdarnell added a commit that closed this issue Apr 13, 2013
@bdarnell bdarnell Fix escaping error in blog demo
Closes #726.
74c6075
@bdarnell bdarnell closed this in 74c6075 Apr 13, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment