diff --git a/openlp/core/lib/formattingtags.py b/openlp/core/lib/formattingtags.py
index bb5f1e716..bec2db63a 100644
--- a/openlp/core/lib/formattingtags.py
+++ b/openlp/core/lib/formattingtags.py
@@ -47,7 +47,6 @@ class FormattingTags(object):
Provide access to the html_expands list.
"""
# Load user defined tags otherwise user defined tags are not present.
- FormattingTags.load_tags()
return FormattingTags.html_expands
@staticmethod
diff --git a/openlp/core/lib/renderer.py b/openlp/core/lib/renderer.py
index 39f69dda6..2c9d2a5d1 100644
--- a/openlp/core/lib/renderer.py
+++ b/openlp/core/lib/renderer.py
@@ -131,7 +131,6 @@ class Renderer(object):
``override_levels``
Used to force the theme data passed in to be used.
-
"""
log.debug(u'set override theme to %s', override_theme)
theme_level = self.theme_level
@@ -500,12 +499,15 @@ class Renderer(object):
raw_tags.sort(key=lambda tag: tag[0])
html_tags.sort(key=lambda tag: tag[0])
# Create a list with closing tags for the raw_text.
- end_tags = [tag[2] for tag in raw_tags]
+ end_tags = []
+ start_tags = []
+ for tag in raw_tags:
+ start_tags.append(tag[1])
+ end_tags.append(tag[2])
end_tags.reverse()
# Remove the indexes.
- raw_tags = [tag[1] for tag in raw_tags]
html_tags = [tag[1] for tag in html_tags]
- return raw_text + u''.join(end_tags), u''.join(raw_tags), \
+ return raw_text + u''.join(end_tags), u''.join(start_tags), \
u''.join(html_tags)
def _binary_chop(self, formatted, previous_html, previous_raw, html_list,
diff --git a/openlp/core/lib/serviceitem.py b/openlp/core/lib/serviceitem.py
index a82941341..c8fbe6d8a 100644
--- a/openlp/core/lib/serviceitem.py
+++ b/openlp/core/lib/serviceitem.py
@@ -195,8 +195,7 @@ class ServiceItem(object):
# avoid tracebacks.
if self.raw_footer is None:
self.raw_footer = []
- self.foot_text = \
- u'
'.join([footer for footer in self.raw_footer if footer])
+ self.foot_text = u'
'.join(filter(None, self.raw_footer))
def add_from_image(self, path, title, background=None):
"""
diff --git a/openlp/core/ui/formattingtagform.py b/openlp/core/ui/formattingtagform.py
index 28200d132..d6f880e3f 100644
--- a/openlp/core/ui/formattingtagform.py
+++ b/openlp/core/ui/formattingtagform.py
@@ -164,12 +164,13 @@ class FormattingTagForm(QtGui.QDialog, Ui_FormattingTagDialog):
"""
Reset List for loading.
"""
+ FormattingTags.load_tags()
self.tagTableWidget.clearContents()
self.tagTableWidget.setRowCount(0)
self.newPushButton.setEnabled(True)
self.savePushButton.setEnabled(False)
self.deletePushButton.setEnabled(False)
- for linenumber, html in enumerate(FormattingTags.html_expands):
+ for linenumber, html in enumerate(FormattingTags.get_html_tags()):
self.tagTableWidget.setRowCount(self.tagTableWidget.rowCount() + 1)
self.tagTableWidget.setItem(linenumber, 0,
QtGui.QTableWidgetItem(html[u'desc']))