Formatting tags opened and closed in different verses throw an exception

Bug #1199639 reported by Phill
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenLP
Status tracked in Trunk
2.0
Fix Released
Medium
Oliver Wieland
Trunk
Fix Released
Medium
Samuel Mehrbrodt

Bug Description

http://support.openlp.org/issues/2035

Closing a formatting tag in a different verse from which it was opened causes the "Error Occurred" dialogue to show.

1. Create a new song

2. Add title and author

3. Copy and paste the following text in to the "edit all" dialogue:

---[Verse:1]---
{r}Verse 1 Text
---[Verse:2]---
Verse 2 Text{/r}

4. Save Song

5. Send song live. The "Error Occurred" dialogue shows with the following traceback:

Traceback (most recent call last):
  File "D:\OpenLP_Code\release-2.0.1\build\pyi.win32\OpenLP\out00-PYZ.pyz\openlp.core.lib.mediamanageritem", line 475, in onDoubleClicked
  File "D:\OpenLP_Code\release-2.0.1\build\pyi.win32\OpenLP\out00-PYZ.pyz\openlp.core.lib.mediamanageritem", line 497, in onPreviewClick
  File "D:\OpenLP_Code\release-2.0.1\build\pyi.win32\OpenLP\out00-PYZ.pyz\openlp.core.lib.mediamanageritem", line 591, in buildServiceItem
  File "D:\OpenLP_Code\release-2.0.1\build\pyi.win32\OpenLP\out00-PYZ.pyz\openlp.plugins.songs.lib.mediaitem", line 529, in generateSlideData
  File "D:\OpenLP_Code\release-2.0.1\build\pyi.win32\OpenLP\out00-PYZ.pyz\openlp.plugins.songs.lib.xml", line 361, in song_to_xml
  File "D:\OpenLP_Code\release-2.0.1\build\pyi.win32\OpenLP\out00-PYZ.pyz\openlp.plugins.songs.lib.xml", line 503, in _add_text_with_tags_to_lines
  File "lxml.etree.pyx", line 2723, in lxml.etree.XML (src/lxml/lxml.etree.c:52448)
  File "parser.pxi", line 1573, in lxml.etree._parseMemoryDocument (src/lxml/lxml.etree.c:79932)
  File "parser.pxi", line 1445, in lxml.etree._parseDoc (src/lxml/lxml.etree.c:78709)
  File "parser.pxi", line 920, in lxml.etree._BaseParser._parseUnicodeDoc (src/lxml/lxml.etree.c:75083)
  File "parser.pxi", line 564, in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.c:71739)
  File "parser.pxi", line 645, in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:72614)
  File "parser.pxi", line 585, in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:71955)
XMLSyntaxError: Opening and ending tag mismatch: lines line 1 and tag, line 1, column 26

Related branches

Revision history for this message
Oliver Wieland (oliwee) wrote :

There is a similar bug #1173749 Songs with mismatching formatting tags still throw an exception
The related branch there validates the verses before saving, so that a tag must be closed at the end of a verse. So this issue can't occur with this patch.

I know that this is a solution for new or edited songs, but not for existing ones.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.