~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/xml8.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-06-15 20:11:32 UTC
  • mfrom: (4443.1.2 bzr.dev)
  • Revision ID: pqm@pqm.ubuntu.com-20090615201132-p32zthmt3rjn2tfk
(Jelmer) Move squashing of XML-invalid characters to XMLSerializer.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
    Element,
29
29
    SubElement,
30
30
    XMLSerializer,
 
31
    escape_invalid_chars,
31
32
    )
32
33
from bzrlib.inventory import ROOT_ID, Inventory, InventoryEntry
33
34
from bzrlib.revision import Revision
345
346
            root.set('timezone', str(rev.timezone))
346
347
        root.text = '\n'
347
348
        msg = SubElement(root, 'message')
348
 
        msg.text = rev.message
 
349
        msg.text = escape_invalid_chars(rev.message)[0]
349
350
        msg.tail = '\n'
350
351
        if rev.parent_ids:
351
352
            pelts = SubElement(root, 'parents')