Bläddra i källkod

Fixed #22773 -- Forced templatize() to return unicode

Claude Paroz 10 år sedan
förälder
incheckning
daaeb84158
2 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1 1
      django/utils/translation/trans_real.py
  2. 0 0
      tests/i18n/commands/templates/empty.html

+ 1 - 1
django/utils/translation/trans_real.py

@@ -530,7 +530,7 @@ def templatize(src, origin=None):
     from django.template import (Lexer, TOKEN_TEXT, TOKEN_VAR, TOKEN_BLOCK,
             TOKEN_COMMENT, TRANSLATOR_COMMENT_MARK)
     src = force_text(src, settings.FILE_CHARSET)
-    out = StringIO()
+    out = StringIO('')
     message_context = None
     intrans = False
     inplural = False

+ 0 - 0
tests/i18n/commands/templates/empty.html