<%init>
my $content = $Object->LargeContent || $Object->Content;
$content = $m->comp('/Elements/ScrubHTML', Content => $content);
$content =~ s|\n|<br />|g;

my $status = "Status = '__Active__'";

my $cf = $Object->CustomFieldObj;
my $cf_id = $cf->id;
my $query_value = $Object->LargeContent || $Object->Content;
$query_value =~ s/(['\\])/\\$1/g;
my $query = "CF.{$cf_id} = '$query_value' AND $status";
RT::Interface::Web::EscapeURI(\$query);

</%init>
% if (not $cf->LinkValueTo) {
<a href="<% RT->Config->Get('WebPath') %>/Search/Results.html?Query=<% $query %>">
% }
<%$content|n%>
% if (not $cf->LinkValueTo) {
</a>
% }
<%ARGS>
$Object
</%ARGS>
