forked from openlp/openlp
replaced <br> by <br />
This commit is contained in:
parent
39caaca8d9
commit
74d2b2d25c
@ -202,7 +202,7 @@ def clean_tags(text):
|
||||
"""
|
||||
Remove Tags from text for display
|
||||
"""
|
||||
text = text.replace(u'<br>', u'\n')
|
||||
text = text.replace(u'<br />', u'\n')
|
||||
text = text.replace(u'{br}', u'\n')
|
||||
text = text.replace(u' ', u' ')
|
||||
for tag in DisplayTags.get_html_tags():
|
||||
|
@ -219,7 +219,7 @@ class Renderer(object):
|
||||
"""
|
||||
log.debug(u'format slide')
|
||||
# Add line endings after each line of text used for bibles.
|
||||
line_end = u'<br>'
|
||||
line_end = u'<br />'
|
||||
if item.is_capable(ItemCapabilities.NoLineBreaks):
|
||||
line_end = u' '
|
||||
# Bibles
|
||||
@ -240,7 +240,7 @@ class Renderer(object):
|
||||
pages.extend(self._paginate_slide(lines, line_end))
|
||||
new_pages = []
|
||||
for page in pages:
|
||||
while page.endswith(u'<br>'):
|
||||
while page.endswith(u'<br />'):
|
||||
page = page[:-4]
|
||||
new_pages.append(page)
|
||||
return new_pages
|
||||
@ -326,13 +326,13 @@ class Renderer(object):
|
||||
The text to be fitted on the slide split into lines.
|
||||
|
||||
``line_end``
|
||||
The text added after each line. Either ``u' '`` or ``u'<br>``.
|
||||
The text added after each line. Either ``u' '`` or ``u'<br />``.
|
||||
"""
|
||||
log.debug(u'_paginate_slide - Start')
|
||||
formatted = []
|
||||
previous_html = u''
|
||||
previous_raw = u''
|
||||
separator = u'<br>'
|
||||
separator = u'<br />'
|
||||
html_lines = map(expand_tags, lines)
|
||||
html = self.page_shell + separator.join(html_lines) + HTML_END
|
||||
self.web.setHtml(html)
|
||||
@ -357,7 +357,7 @@ class Renderer(object):
|
||||
The words to be fitted on the slide split into lines.
|
||||
|
||||
``line_end``
|
||||
The text added after each line. Either ``u' '`` or ``u'<br>``. This
|
||||
The text added after each line. Either ``u' '`` or ``u'<br />``. This
|
||||
is needed for bibles.
|
||||
"""
|
||||
log.debug(u'_paginate_slide_words - Start')
|
||||
@ -434,12 +434,12 @@ class Renderer(object):
|
||||
using the binary chop. The elements can contain display tags.
|
||||
|
||||
``separator``
|
||||
The separator for the elements. For lines this is ``u'<br>'`` and
|
||||
The separator for the elements. For lines this is ``u'<br />'`` and
|
||||
for words this is ``u' '``.
|
||||
|
||||
``line_end``
|
||||
The text added after each "element line". Either ``u' '`` or
|
||||
``u'<br>``. This is needed for bibles.
|
||||
``u'<br />``. This is needed for bibles.
|
||||
"""
|
||||
smallest_index = 0
|
||||
highest_index = len(html_list) - 1
|
||||
@ -459,7 +459,7 @@ class Renderer(object):
|
||||
# We found the number of words which will fit.
|
||||
if smallest_index == index or highest_index == index:
|
||||
index = smallest_index
|
||||
formatted.append(previous_raw.rstrip(u'<br>') +
|
||||
formatted.append(previous_raw.rstrip(u'<br />') +
|
||||
separator.join(raw_list[:index + 1]))
|
||||
previous_html = u''
|
||||
previous_raw = u''
|
||||
|
@ -174,7 +174,7 @@ class ServiceItem(object):
|
||||
for slide in self._raw_frames:
|
||||
pages = self.renderer.format_slide(slide[u'raw_slide'], self)
|
||||
for page in pages:
|
||||
page = page.replace(u'<br>', u'{br}')
|
||||
page = page.replace(u'<br />', u'{br}')
|
||||
html = expand_tags(cgi.escape(page.rstrip()))
|
||||
self._display_frames.append({
|
||||
u'title': clean_tags(page),
|
||||
@ -194,7 +194,7 @@ class ServiceItem(object):
|
||||
if self.raw_footer is None:
|
||||
self.raw_footer = []
|
||||
self.foot_text = \
|
||||
u'<br>'.join([footer for footer in self.raw_footer if footer])
|
||||
u'<br />'.join([footer for footer in self.raw_footer if footer])
|
||||
|
||||
def add_from_image(self, path, title):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user