~ubuntu-branches/debian/sid/calibre/sid

« back to all changes in this revision

Viewing changes to src/calibre/ebooks/conversion/plugins/mobi_input.py

  • Committer: Package Import Robot
  • Author(s): Martin Pitt
  • Date: 2014-05-14 18:17:50 UTC
  • mfrom: (1.5.10)
  • Revision ID: package-import@ubuntu.com-20140514181750-xyrxqa47dbw0qfhu
Tags: 1.36.0+dfsg-1
* New upstream release:
  - Fixes editing of metadata (Closes: #741638)

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
            if isinstance(raw, unicode):
51
51
                raw = raw.encode('utf-8')
52
52
            open(u'debug-raw.html', 'wb').write(raw)
 
53
        from calibre.ebooks.oeb.base import close_self_closing_tags
53
54
        for f, root in parse_cache.items():
 
55
            raw = html.tostring(root, encoding='utf-8', method='xml',
 
56
                    include_meta_content_type=False)
 
57
            raw = close_self_closing_tags(raw)
54
58
            with open(f, 'wb') as q:
55
 
                q.write(html.tostring(root, encoding='utf-8', method='xml',
56
 
                    include_meta_content_type=False))
 
59
                q.write(raw)
57
60
                accelerators['pagebreaks'] = '//h:div[@class="mbp_pagebreak"]'
58
61
        return mr.created_opf_path
59
62