[Rt-commit] rt branch, 4.0/quote-folding-incorrest-nesting, created. rt-4.0.5-81-g1eb1812

? sunnavy sunnavy at bestpractical.com
Mon Jul 16 13:29:41 EDT 2012


The branch, 4.0/quote-folding-incorrest-nesting has been created
        at  1eb18124822f650896fa52a6eace76b472bb83da (commit)

- Log -----------------------------------------------------------------
commit 1eb18124822f650896fa52a6eace76b472bb83da
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Fri Mar 9 00:07:04 2012 +0800

    don't fold for outlook alike quotes when they are inside some elements in a stanza
    
    the folding causes incorrest nesting html and breaks the following elements'
    ui badly, e.g.
    
    an html element in a stanza, e.g.
    
    <pre>
    -----Original Message-----
    </pre>
    
    will be converted to
    
    <pre>
    <span...>...</span>
    <div class="message-stanza ...">-----Original Message-----
    </pre>
    </div>

diff --git a/share/html/Ticket/Elements/ShowMessageStanza b/share/html/Ticket/Elements/ShowMessageStanza
index 8a85443..a5c49d4 100755
--- a/share/html/Ticket/Elements/ShowMessageStanza
+++ b/share/html/Ticket/Elements/ShowMessageStanza
@@ -97,6 +97,7 @@ AGAIN: foreach ( ; $i < @$Message; $i++ ) {
             # Fix message stanza nesting for Outlook's quoting styles
             if (     $stanza->{raw}
                  and not $stanza->{_outlooked}
+                 and ( $ContentType ne 'text/html' || $stanza->{raw} !~ m{<\w+.*?>} )
                  and $stanza->{raw} =~ /^               # start of an internal line
                                         \s*             # optional whitespace
                                         (?:

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


More information about the Rt-commit mailing list