[Rt-commit] [svn] r1498 -
rt/branches/3.2-RELEASE/html/Ticket/Elements
leira at pallas.eruditorum.org
leira at pallas.eruditorum.org
Thu Sep 16 18:28:21 EDT 2004
Author: leira
Date: Thu Sep 16 18:28:20 2004
New Revision: 1498
Modified:
rt/branches/3.2-RELEASE/html/Ticket/Elements/ShowMessageHeaders
Log:
Add another callback that passes parsed headers.
Useful for MakeClicky, among other things.
Modified: rt/branches/3.2-RELEASE/html/Ticket/Elements/ShowMessageHeaders
==============================================================================
--- rt/branches/3.2-RELEASE/html/Ticket/Elements/ShowMessageHeaders (original)
+++ rt/branches/3.2-RELEASE/html/Ticket/Elements/ShowMessageHeaders Thu Sep 16 18:28:20 2004
@@ -49,7 +49,7 @@
% next unless ($display_headers{'_all'} || $display_headers{lc($header->{'Tag'})});
<tr>
<td align="right" class="message-header-key"><%$header->{'Tag'}%>:</td>
-<td class="message-header-value"><%$header->{'Value'}%></td>
+<td class="message-header-value"><%$header->{'Value'} | n%></td>
</tr>
% }
</table>
@@ -57,6 +57,9 @@
my $content = $Headers;
$m->comp('/Elements/Callback', content => \$content, %ARGS);
+# apply html escaping on the original content
+# we'll display the value without escaping later (for MakeClicky et al.)
+$content = $m->interp->apply_escapes($content, 'h');
my @lines = split (/\n/,$content);
my $in_header = 0;
@@ -70,13 +73,13 @@
push (@headers, { Tag => $_, Value => ''} );
}
-
}
my %display_headers;
map { $display_headers{lc($_)} = 1 } @$DisplayHeaders;
+$m->comp('/Elements/Callback', _CallbackName => 'Headers', content => \$content, headers => \@headers, display_headers => \%display_headers, %ARGS);
</%INIT>
<%ARGS>
More information about the Rt-commit
mailing list