This commit is contained in:
Jon Tibble 2010-07-03 22:50:42 +01:00
parent 1e4a11f4e5
commit aa390e9831
3 changed files with 4 additions and 6 deletions

View File

@ -222,4 +222,3 @@ class Theme(object):
if key[0:1] != u'_': if key[0:1] != u'_':
theme_strings.append(u'%30s : %s' % (key, getattr(self, key))) theme_strings.append(u'%30s : %s' % (key, getattr(self, key)))
return u'\n'.join(theme_strings) return u'\n'.join(theme_strings)

View File

@ -664,4 +664,3 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
log.debug(u'processTitle') log.debug(u'processTitle')
self.song.search_title = \ self.song.search_title = \
re.sub(r'[\'"`,;:(){}?]+', u'', unicode(self.song.search_title)) re.sub(r'[\'"`,;:(){}?]+', u'', unicode(self.song.search_title))

View File

@ -38,10 +38,8 @@ The basic XML is of the format::
""" """
import logging import logging
import StringIO
from lxml import etree, objectify from lxml import etree, objectify
#from lxml.etree import SubElement, XMLSyntaxError, dump
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
@ -86,13 +84,15 @@ class SongXMLBuilder(object):
""" """
Debugging aid to dump XML so that we can see what we have. 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): def extract_xml(self):
""" """
Extract our newly created XML song. 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): class SongXMLParser(object):