changeset 464:6ea0b9a3ca4e

unicode-encode contents of blocks and macros in parser
author Radomir Dopieralski <moindev@sheep.art.pl>
date Thu, 07 Aug 2008 11:17:04 +0200
parents 14db7a5064dd
children 1fb024b114e3
files dandelion/wikiparser.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/dandelion/wikiparser.py	Sun Aug 03 19:04:13 2008 +0200
+++ b/dandelion/wikiparser.py	Thu Aug 07 11:17:04 2008 +0200
@@ -183,7 +183,7 @@
         # XXX A hack to handle {{{...}}} code blocks, this method reads lines
         # directly from input.
         for part in block:
-            line = self.lines.next()
+            line = unicode(self.lines.next(), "utf-8", "replace")
             lines = []
             while not self.code_close_re.match(line):
                 lines.append(line)
@@ -200,7 +200,7 @@
         # directly from input.
         for part in block:
             name = part.lstrip('<').strip()
-            line = self.lines.next()
+            line = unicode(self.lines.next(), "utf-8", "replace")
             lines = []
             while not self.macro_close_re.match(line):
                 lines.append(line)