[rt-users] ShowMessageStanza callback with 3.8.0 + html escaping on output text

David Sitsky sits at nuix.com
Wed Feb 11 00:58:14 EST 2009


Ok - perhaps the wiki is out of date.  I've managed to do this using a 
Custom MakeClicky action as specified here: 
http://www.l2c2.co.in/rt-3.8.0/docs/extending_clickable_links.pod.

Guess the wiki should be updated..

David Sitsky wrote:
> Hi,
> 
> I have written a basic ShowMessageStanza callback following instructions 
> from http://wiki.bestpractical.com/view/CustomizingWithCallbacks/2212 as 
> follows to create links automatically when matching patterns.  In this 
> case, the pattern is 4 alphabetic characters followed by 4 digits.
> 
> <%init>
> my $val = $$content;
> use bytes;
> $val =~ s|\b[A-Z]{4}\d{4}\b|<a href="https://example.com/show/$&">$&<\/a>|g;
> $$content = $val;
> </%init>
> <%args>
> $content => undef
> </%args>
> 
> The code runs as expected, however my output has been html escaped, so 
> if I see the message body.
> 
> Here is ABCD1234 as requested.
> 
> This appears in the browser window as:
> 
> Here is <a href="http://example.com/show/ABCD1234">ABCD1234</a> as 
> requested.
> 
> Is there some trick I need to do to make this not escape my output?
> 


-- 
Cheers,
David

Nuix Pty Ltd
Suite 79, 89 Jones St, Ultimo NSW 2007, Australia    Ph: +61 2 9280 0699
Web: http://www.nuix.com                            Fax: +61 2 9212 6902



More information about the rt-users mailing list