~ubuntu-branches/ubuntu/natty/moin/natty-updates

« back to all changes in this revision

Viewing changes to MoinMoin/script/migration/text_moin158_wiki.py

  • Committer: Bazaar Package Importer
  • Author(s): Jonas Smedegaard
  • Date: 2008-06-22 21:17:13 UTC
  • mto: This revision was merged to the branch mainline in revision 18.
  • Revision ID: james.westby@ubuntu.com-20080622211713-inlv5k4eifxckelr
ImportĀ upstreamĀ versionĀ 1.7.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
217
217
        inline = url[0] == 'i'
218
218
        drawing = url[0] == 'd'
219
219
        url = url.split(":", 1)[1]
220
 
        url = wikiutil.url_unquote(url)
 
220
        url = wikiutil.url_unquote(url, want_unicode=True)
221
221
        text = text or url
222
222
 
223
223
        from MoinMoin.action import AttachFile
748
748
 
749
749
    def _heading_repl(self, word):
750
750
        """Handle section headings."""
751
 
        from MoinMoin.support.python_compatibility import hash_new
 
751
        import sha
752
752
 
753
753
        h = word.strip()
754
754
        level = 1
768
768
        if self.titles[pntt] > 1:
769
769
            unique_id = '-%d' % self.titles[pntt]
770
770
        result = self._closeP()
771
 
        result += self.formatter.heading(1, depth, id="head-"+hash_new('sha1', pntt.encode(config.charset)).hexdigest()+unique_id)
 
771
        result += self.formatter.heading(1, depth, id="head-"+sha.new(pntt.encode(config.charset)).hexdigest()+unique_id)
772
772
 
773
773
        return (result + self.formatter.text(title_text) +
774
774
                self.formatter.heading(0, depth))