[Rt-commit] rt branch, 4.2/large-size-in-search-format, created. rt-4.2.12-56-gd073798

? sunnavy sunnavy at bestpractical.com
Sun Oct 4 15:35:25 EDT 2015


The branch, 4.2/large-size-in-search-format has been created
        at  d073798abd91cc9451eba6a94f88d574242e6440 (commit)

- Log -----------------------------------------------------------------
commit d073798abd91cc9451eba6a94f88d574242e6440
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Mon Oct 5 03:28:02 2015 +0800

    handle large size in search format
    
    previously we added a fake "<large>", which will be automatically stripped
    by html scrubber, so it didn't work.
    
    "<big>" is not good either because it's not valid in HTML 5

diff --git a/share/html/Search/Elements/BuildFormatString b/share/html/Search/Elements/BuildFormatString
index 47e8094..353d726 100644
--- a/share/html/Search/Elements/BuildFormatString
+++ b/share/html/Search/Elements/BuildFormatString
@@ -165,8 +165,14 @@ elsif ( $AddCol ) {
                 $column{Suffix} .= "</i>";
             }
             if ($Size) {
-                $column{Prefix} .= "<" . $m->interp->apply_escapes( $Size,  'h' ) . ">";
-                $column{Suffix} .= "</" . $m->interp->apply_escapes( $Size, 'h' ) . ">";
+                if ( $Size eq 'Large' ) {
+                    $column{Prefix} .= '<span style="font-size:larger">';
+                    $column{Suffix} .= '</span>';
+                }
+                else {
+                    $column{Prefix} .= "<" . $m->interp->apply_escapes( $Size,  'h' ) . ">";
+                    $column{Suffix} .= "</" . $m->interp->apply_escapes( $Size, 'h' ) . ">";
+                }
             }
             if ( $Link eq "Display" ) {
                 $column{Prefix} .= q{<a HREF="__WebPath__/Ticket/Display.html?id=__id__">};

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


More information about the rt-commit mailing list