[tor-commits] [bridgedb/master] Fix http utf8 issue: Add a content-type header to the HTML.

karsten at torproject.org karsten at torproject.org
Mon Apr 11 06:39:14 UTC 2011


commit c69bc14f88e8b903bcf90538e8e5fac147805748
Author: Christian Fromme <kaner at strace.org>
Date:   Sat Apr 9 12:03:41 2011 +0200

    Fix http utf8 issue: Add a content-type header to the HTML.
---
 lib/bridgedb/Server.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/lib/bridgedb/Server.py b/lib/bridgedb/Server.py
index 7b7ff55..2becee8 100644
--- a/lib/bridgedb/Server.py
+++ b/lib/bridgedb/Server.py
@@ -100,7 +100,10 @@ class WebResource(twisted.web.resource.Resource):
                 + "".join(("<li>%s</li>"%d for d in self.domains)) + "</ul>"
         else:
             email_domain_list = "<p>" + t.gettext(I18n.BRIDGEDB_TEXT[8]) + "</p>"
-        html_msg = "<html><body>" \
+        html_msg = "<html><head>"\
+                   + "<meta http-equiv=\"Content-Type\" content=\"text/html;"\
+                   + " charset=UTF-8\"/>" \
+                   + "</head><body>" \
                    + "<p>" + t.gettext(I18n.BRIDGEDB_TEXT[0]) \
                    + "<pre id=\"bridges\">" \
                    + "%s" \



More information about the tor-commits mailing list