[Rt-commit] rt branch 5.0/remove-html-line-break-after-signature created. rt-5.0.1-610-gba094f3190

BPS Git Server git at git.bestpractical.com
Thu Sep 2 15:22:58 UTC 2021


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rt".

The branch, 5.0/remove-html-line-break-after-signature has been created
        at  ba094f3190745cd045c27dc757a1ec4f8b42a022 (commit)

- Log -----------------------------------------------------------------
commit ba094f3190745cd045c27dc757a1ec4f8b42a022
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Thu Sep 2 23:18:14 2021 +0800

    Update tests for the removal of "<br />" after signature above quote

diff --git a/t/web/signatures.t b/t/web/signatures.t
index 72f9bb1353..d312c0989e 100644
--- a/t/web/signatures.t
+++ b/t/web/signatures.t
@@ -151,7 +151,7 @@ subtest "HTML, reply, before quote" => sub {
     template_is(
         qw/HTML Quote BeforeQuote/,
         '<br /><p>-- <br />Signature one<br />Signature two</p>'
-            . "<br />" . $quote,
+            . $quote,
     ) };
 
 

commit 8340f40c8719901b9b0ea98d88d3861c8b74bf8d
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Thu Sep 2 22:18:12 2021 +0800

    Remove the additional HTML line break after signature above quote
    
    This is mainly because the <br> breaks CKEditor's parser somehow and
    quoted plain text content is wrongly wrapped into a <p> instead of a
    <blockquote>, which causes multi-line texts to be squashed into a single
    line.
    
    Note that the <br> is not needed here either, as in CKEditor, signature
    is put into a separate "<p>", and an empty "<p>" is automatically added
    after it(because of the <div class="gmail_quote"> wrapper for quoted
    content), so space between signature and quoted content is already quite
    noticable.
    
    This change is also more consistent with code below that's for
    "signature below quote".

diff --git a/share/html/Elements/MessageBox b/share/html/Elements/MessageBox
index 1c199816a6..b3f480fc7c 100644
--- a/share/html/Elements/MessageBox
+++ b/share/html/Elements/MessageBox
@@ -92,7 +92,7 @@ if ( $IncludeSignature and $signature =~ /\S/ ) {
 
     if ($message =~ /\S/) {
         if (RT->Config->Get('SignatureAboveQuote', $session{CurrentUser})) {
-            $signature .= $Type eq 'text/html' ? "<br />" : "\n";
+            $signature .= $Type eq 'text/html' ? "" : "\n";
         } else {
             $signature = ($Type eq 'text/html' ? "" : "\n") . $signature;
         }

-----------------------------------------------------------------------


hooks/post-receive
-- 
rt


More information about the rt-commit mailing list