diff --git a/openlp/plugins/songs/lib/openlyricsxml.py b/openlp/plugins/songs/lib/openlyricsxml.py index 83d40e54e..984e41960 100644 --- a/openlp/plugins/songs/lib/openlyricsxml.py +++ b/openlp/plugins/songs/lib/openlyricsxml.py @@ -676,8 +676,10 @@ class OpenLyrics(object): text = '' # Convert lxml.objectify to lxml.etree representation. string_lines = etree.tostring(lines) - # lxml 4.6.x or some recent version of libxml2 seems to add the left-over tags in - string_lines = string_lines.replace('', '').replace('', '').replace('') + # lxml 4.6.x or some recent version of libxml2 seems to add the rest of the song to the string, so split on the + # closing verse tag, and then add it back in + string_lines, _ = string_lines.split(b'', 1) + string_lines += b'' element = etree.XML(string_lines) # OpenLyrics 0.8 uses
for new lines. Append text from "lines" element to verse text.