~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/xml4.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:
19
19
    ElementTree,
20
20
    SubElement,
21
21
    XMLSerializer,
 
22
    escape_invalid_chars,
22
23
    )
23
24
from bzrlib.inventory import ROOT_ID, Inventory, InventoryEntry
24
25
import bzrlib.inventory as inventory
125
126
        root.text = '\n'
126
127
 
127
128
        msg = SubElement(root, 'message')
128
 
        msg.text = rev.message
 
129
        msg.text = escape_invalid_chars(rev.message)[0]
129
130
        msg.tail = '\n'
130
131
 
131
132
        if rev.parents: