Skip to content
This repository

Ensure apply block in template returns utf8 #606

Merged
merged 1 commit into from over 1 year ago

2 participants

DLC Ben Darnell
DLC

Previously it did not return utf8 which meant built in functions
such as linkify could cause problems as well

Ben Darnell bdarnell merged commit 5339614 into from October 04, 2012
Ben Darnell bdarnell closed this October 04, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Oct 04, 2012
DLC Ensure result from apply block is utf8 5339614
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  tornado/template.py
2  tornado/template.py
@@ -479,7 +479,7 @@ def generate(self, writer):
479 479
             writer.write_line("_append = _buffer.append", self.line)
480 480
             self.body.generate(writer)
481 481
             writer.write_line("return _utf8('').join(_buffer)", self.line)
482  
-        writer.write_line("_append(%s(%s()))" % (
  482
+        writer.write_line("_append(_utf8(%s(%s())))" % (
483 483
             self.method, method_name), self.line)
484 484
 
485 485
 
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.