"<" in song lyrics causes a traceback
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenLP |
Fix Released
|
High
|
Unassigned |
Bug Description
Hello,
When a song's lyrics contains "<" (and you try to preview the song) then the following traceback is shown.
**OpenLP Bug Report**
Version: {u'full': u'1.9.7-bzr1765', u'version': u'1.9.7', u'build': u'bzr1765'}
--- Exception Traceback ---
Traceback (most recent call last):
File "/home/
self.
File "/home/
serviceItem = self.buildServi
File "/home/
if self.generateSl
File "/home/
service_
File "/home/
virtual_verse, tags_element)
File "/home/
element = etree.XML(text)
File "lxml.etree.pyx", line 2723, in lxml.etree.XML (src/lxml/
File "parser.pxi", line 1573, in lxml.etree.
File "parser.pxi", line 1445, in lxml.etree.
File "parser.pxi", line 920, in lxml.etree.
File "parser.pxi", line 564, in lxml.etree.
File "parser.pxi", line 645, in lxml.etree.
File "parser.pxi", line 585, in lxml.etree.
XMLSyntaxError: StartTag: invalid element name, line 1, column 23
--- System information ---
Plattform: Linux-3.
--- Library Versions ---
Python: 2.7.2
Qt4: 4.7.4
Phonon: 4.5.55
PyQt4: 4.8.5
SQLAlchemy: 0.7.2
BeautifulSoup: 3.2.0
lxml: 2.3.0
Chardet: 2.0.1
PyEnchant: 1.6.3
PySQLite: 1.0.1
Related branches
- Tim Bentley: Approve
-
Diff: 108 lines (+23/-22)1 file modifiedopenlp/plugins/songs/lib/xml.py (+23/-22)
description: | updated |
Changed in openlp: | |
assignee: | nobody → Andreas Preikschat (googol) |
status: | New → In Progress |
Changed in openlp: | |
status: | In Progress → Fix Committed |
Changed in openlp: | |
status: | Fix Committed → Fix Released |
On a similar theme, when I have a song with an "&" in it and preview it, I get
Traceback (most recent call last): Code\trunk\ build\pyi. win32\OpenLP\ outPYZ1. pyz/openlp. core.lib. mediamanagerite m", line 516, in onSelectionChange Code\trunk\ build\pyi. win32\OpenLP\ outPYZ1. pyz/openlp. core.lib. mediamanagerite m", line 529, in onPreviewClick Code\trunk\ build\pyi. win32\OpenLP\ outPYZ1. pyz/openlp. core.lib. mediamanagerite m", line 623, in buildServiceItem Code\trunk\ build\pyi. win32\OpenLP\ outPYZ1. pyz/openlp. plugins. songs.lib. mediaitem" , line 509, in generateSlideData Code\trunk\ build\pyi. win32\OpenLP\ outPYZ1. pyz/openlp. plugins. songs.lib. xml", line 341, in song_to_xml Code\trunk\ build\pyi. win32\OpenLP\ outPYZ1. pyz/openlp. plugins. songs.lib. xml", line 450, in _add_text_ with_tags_ to_lines lxml.etree. c:48057) _parseMemoryDoc ument (src/lxml/ lxml.etree. c:71812) _parseDoc (src/lxml/ lxml.etree. c:70608) _BaseParser. _parseUnicodeDo c (src/lxml/ lxml.etree. c:67148) _ParserContext. _handleParseRes ultDoc (src/lxml/ lxml.etree. c:63824) _handleParseRes ult (src/lxml/ lxml.etree. c:64745) _raiseParseErro r (src/lxml/ lxml.etree. c:64088)
File "D:\OpenLP_
File "D:\OpenLP_
File "D:\OpenLP_
File "D:\OpenLP_
File "D:\OpenLP_
File "D:\OpenLP_
File "lxml.etree.pyx", line 2512, in lxml.etree.XML (src/lxml/
File "parser.pxi", line 1545, in lxml.etree.
File "parser.pxi", line 1417, in lxml.etree.
File "parser.pxi", line 898, in lxml.etree.
File "parser.pxi", line 539, in lxml.etree.
File "parser.pxi", line 625, in lxml.etree.
File "parser.pxi", line 565, in lxml.etree.
XMLSyntaxError: xmlParseEntityRef: no name, line 1, column 22