forked from openlp/openlp
Cleanups
This commit is contained in:
parent
1e4a11f4e5
commit
aa390e9831
@ -222,4 +222,3 @@ class Theme(object):
|
||||
if key[0:1] != u'_':
|
||||
theme_strings.append(u'%30s : %s' % (key, getattr(self, key)))
|
||||
return u'\n'.join(theme_strings)
|
||||
|
||||
|
@ -664,4 +664,3 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
|
||||
log.debug(u'processTitle')
|
||||
self.song.search_title = \
|
||||
re.sub(r'[\'"`,;:(){}?]+', u'', unicode(self.song.search_title))
|
||||
|
||||
|
@ -38,10 +38,8 @@ The basic XML is of the format::
|
||||
"""
|
||||
|
||||
import logging
|
||||
import StringIO
|
||||
|
||||
from lxml import etree, objectify
|
||||
#from lxml.etree import SubElement, XMLSyntaxError, dump
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@ -86,13 +84,15 @@ class SongXMLBuilder(object):
|
||||
"""
|
||||
Debugging aid to dump XML so that we can see what we have.
|
||||
"""
|
||||
return etree.tostring(self.song_xml, pretty_print=True)
|
||||
return etree.tostring(self.song_xml, encoding=u'UTF-8',
|
||||
xml_declaration=True, pretty_print=True)
|
||||
|
||||
def extract_xml(self):
|
||||
"""
|
||||
Extract our newly created XML song.
|
||||
"""
|
||||
return etree.tostring(self.song_xml, encoding=u'utf-8')
|
||||
return etree.tostring(self.song_xml, encoding=u'UTF-8',
|
||||
xml_declaration=True)
|
||||
|
||||
|
||||
class SongXMLParser(object):
|
||||
|
Loading…
Reference in New Issue
Block a user