]> git.phdru.name Git - phdru.name/phdru.name.git/commitdiff
Do not convert to local encoding -- it will be converted later
authorOleg Broytman <phd@phdru.name>
Tue, 15 Jan 2013 17:24:10 +0000 (17:24 +0000)
committerOleg Broytman <phd@phdru.name>
Tue, 15 Jan 2013 17:24:10 +0000 (17:24 +0000)
git-svn-id: file:///home/phd/archive/SVN/phdru.name/scripts@142 7bb0bf08-9e0d-0410-b083-99cee3bf18b8

phd.py

diff --git a/phd.py b/phd.py
index ed53e83ab5d2ef4acaed3fde5b86e6e4d7321b7c..1e34234998a569fbe621cc7256bdd76c521044ed 100644 (file)
--- a/phd.py
+++ b/phd.py
@@ -66,19 +66,18 @@ class phd(Template):
 
    def rst2html(self):
       from docutils.core import publish_parts
-      from m_lib.defenc import default_encoding as encoding
 
       parts = publish_parts(self.body_rst(), writer_name="html")
 
-      title = parts["title"].encode(encoding) or self.Title
+      title = parts["title"] or self.Title
       if title:
          title = "<h1>%s</h1>" % title
 
-      subtitle = parts["subtitle"].encode(encoding)
+      subtitle = parts["subtitle"]
       if subtitle:
          subtitle = "<h2>%s</h2>" % subtitle
 
-      body = parts["body"].encode(encoding)
+      body = parts["body"]
       parts = [part for part in (title, subtitle, body) if part]
       return "\n\n".join(parts)