~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/xml8.py

  • Committer: Jelmer Vernooij
  • Date: 2009-06-09 00:59:51 UTC
  • mto: (4443.1.1 bzr.dev)
  • mto: This revision was merged to the branch mainline in revision 4444.
  • Revision ID: jelmer@samba.org-20090609005951-apv900cdk35o2ygh
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')