]> git.ipfire.org Git - pbs.git/commitdiff
Remove line break option from Text module
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 27 Oct 2017 10:44:07 +0000 (11:44 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 27 Oct 2017 10:44:07 +0000 (11:44 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/templates/modules/log-entry-comment.html
src/web/ui_modules.py

index ff425c80377440873268ed2ecaa7f9ccd19ed28d..ca5a4a877518115284d9fe9b4ee53a85b126548c 100644 (file)
@@ -16,7 +16,7 @@
 
 {% block message %}
        {% if entry.get_message(current_user) %}
-               {% module Text(entry.get_message(current_user), remove_linebreaks=False) %}
+               {% module Text(entry.get_message(current_user)) %}
        {% else %}
                <p class="muted">
                        {{ _("No comment given.") }}
index 1b4f0b165462aa7845d08e14164a2cec56a66f8f..8fd65adb93d6c078e532050d1ee118e7fed5bd53 100644 (file)
@@ -33,14 +33,11 @@ class TextModule(UIModule):
                        paragraph = "".join(line_iteration)
                        yield paragraph.replace("\n", " ")
 
-       def render(self, text, pre=False, remove_linebreaks=True):
+       def render(self, text, pre=False):
                # Handle empty messages
                if not text:
                        return ""
 
-               if remove_linebreaks:
-                       text = text.replace("\n", " ")
-
                # Search for bug ids that need to be linked to bugzilla
                text = re.sub(self.BUGZILLA_PATTERN, self._bugzilla_repl, text, re.I|re.U)