~ubuntu-branches/ubuntu/natty/moin/natty-security

« back to all changes in this revision

Viewing changes to MoinMoin/parser/text_xslt.py

  • Committer: Bazaar Package Importer
  • Author(s): Jonas Smedegaard
  • Date: 2008-07-24 23:50:51 UTC
  • Revision ID: james.westby@ubuntu.com-20080724235051-qzjvwmfslyahnjnx
Tags: 1.7.1-1
* New upstream release.  Closes: bug#492233, thanks to Teodor.
  + Fixes bogus empty page creation.  Closes: bug#489146, thanks to
    Sam Morris.
* Recommend python-xml, needed for RSS feeds.  Closes: bug#488777,
  thanks to Sam Morris.
* Add patch 10001 to disable RenderAsDocbook if python-xml is not
  available. Closes: bug#487741, thanks to Franklin Piat.
* Update cdbs snippets:
  + Move dependency cleanup to new local snippet package-relations.mk.
  + Update copyright-check output to more closely match proposed new
    copyright file format.
  + Update README.cdbs-tweaks.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
    Dependencies = Dependencies
29
29
 
30
30
    def __init__(self, raw, request, **kw):
31
 
        self.raw = raw.encode(config.charset)
 
31
        self.raw = raw
32
32
        self.request = request
33
33
        self.form = request.form
34
34
        self._ = request.getText
87
87
                input_factory = InputSource.InputSourceFactory(resolver=wiki_resolver)
88
88
 
89
89
                page_uri = self.base_uri + wikiutil.url_quote(formatter.page.page_name)
90
 
                raw = self.raw.strip()
91
 
 
 
90
                # 4Suite needs an utf-8 encoded byte string instead of an unicode object
 
91
                raw = self.raw.strip().encode('utf-8')
92
92
                self.processor = Processor()
93
93
                self.append_stylesheet() # hook, for extending this parser
94
94
                self.processor.run(
95
95
                    input_factory.fromString(raw, uri=page_uri),
96
96
                    outputStream=out_file)
97
 
                result = out_file.getvalue()
 
97
                # Convert utf-8 encoded byte string into unicode
 
98
                result = out_file.getvalue().decode('utf-8')
98
99
                result = self.parse_result(result) # hook, for extending this parser
99
100
 
100
101
            except FtException, msg: