[Rt-commit] rt branch, 4.0/quote-characters, created. rt-4.0.5-93-g9d4158c
? sunnavy
sunnavy at bestpractical.com
Thu Mar 22 03:38:39 EDT 2012
The branch, 4.0/quote-characters has been created
at 9d4158cd67a49871ed7848b9b0a270907855eee7 (commit)
- Log -----------------------------------------------------------------
commit 9d4158cd67a49871ed7848b9b0a270907855eee7
Author: sunnavy <sunnavy at bestpractical.com>
Date: Thu Mar 22 13:36:50 2012 +0800
add config item $QuoteCharacters to customize quote chars in Text::Quoted
diff --git a/etc/RT_Config.pm.in b/etc/RT_Config.pm.in
index 5569b9d..26ca13c 100755
--- a/etc/RT_Config.pm.in
+++ b/etc/RT_Config.pm.in
@@ -1643,6 +1643,16 @@ your own styles of link detection.
Set(@Active_MakeClicky, qw());
+=item C<$QuoteCharacters>
+
+customize quote chars used in Text::Quoted, e.g. to allow ':' and '#':
+
+Set($QuoteCharacters, qr/[:#]/);
+
+=cut
+
+Set($QuoteCharacters, undef);
+
=back
diff --git a/share/html/Ticket/Elements/ShowTransactionAttachments b/share/html/Ticket/Elements/ShowTransactionAttachments
index 877201f..845076f 100644
--- a/share/html/Ticket/Elements/ShowTransactionAttachments
+++ b/share/html/Ticket/Elements/ShowTransactionAttachments
@@ -235,7 +235,11 @@ my $render_attachment = sub {
elsif ( $message->ContentType =~ m{^(text|message)}i ) {
unless ( length $name ) {
- eval { require Text::Quoted; $content = Text::Quoted::extract($content); };
+ eval {
+ require Text::Quoted;
+ Text::Quoted::set_quote_char(RT->Config->Get('QuoteCharacters'));
+ $content = Text::Quoted::extract($content);
+ };
if ($@) { $RT::Logger->warning( "Text::Quoted failed: $@" ) }
}
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list