[Rt-commit] rt branch, 4.0/uri-escape-cf-filenames, created. rt-4.0.0rc8-152-g0fb43b6
Thomas Sibley
trs at bestpractical.com
Thu Apr 21 12:22:48 EDT 2011
The branch, 4.0/uri-escape-cf-filenames has been created
at 0fb43b66da0d5784bc4271c6d47f9f40a45b0f25 (commit)
- Log -----------------------------------------------------------------
commit 0fb43b66da0d5784bc4271c6d47f9f40a45b0f25
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Apr 21 12:22:02 2011 -0400
URI escape filenames when displaying file/image CFs
This fixes #17173.
diff --git a/share/html/Elements/ShowCustomFieldBinary b/share/html/Elements/ShowCustomFieldBinary
index d08e807..294e27b 100644
--- a/share/html/Elements/ShowCustomFieldBinary
+++ b/share/html/Elements/ShowCustomFieldBinary
@@ -45,7 +45,7 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<a href="<%RT->Config->Get('WebPath')%>/Download/CustomFieldValue/<% $Object->Id %>/<% $Object->Content %>"><% $Object->Content %></a>
+<a href="<%RT->Config->Get('WebPath')%>/Download/CustomFieldValue/<% $Object->Id %>/<% $Object->Content |u %>"><% $Object->Content %></a>
<%ARGS>
$Object => undef
</%ARGS>
diff --git a/share/html/Elements/ShowCustomFieldImage b/share/html/Elements/ShowCustomFieldImage
index 3d22e5c..71bee62 100644
--- a/share/html/Elements/ShowCustomFieldImage
+++ b/share/html/Elements/ShowCustomFieldImage
@@ -45,7 +45,7 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-% my $url = RT->Config->Get('WebPath') . "/Download/CustomFieldValue/".$Object->Id.'/'.$Object->Content;
+% my $url = RT->Config->Get('WebPath') . "/Download/CustomFieldValue/".$Object->Id.'/'.$m->interp->apply_escapes($Object->Content, 'u');
<a href="<% $url %>"><% $Object->Content %></a>
<img type="<% $Object->ContentType %>" height="64" src="<% $url %>" align="middle" />
<%ARGS>
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list