[rt-devel] default_escape_flags => 'h'

Sergey Gurov cec2000 at mail.ru
Wed Apr 2 11:11:39 EST 2003


>have a look at how rt3 supplies its own escaping method in
>lib/RT/Interface/Web.pm. you might be able to us that technique to
>"back out" the difference in HTML::Entities

Thanks a lot, Jesse.
RT rocks as always :)

Sergey

Here is the diff of /rt2/lib/RT/InterfaceWeb.pm (2.0.15) in case
somebody else follow us:
----------------------------------
101a102
>     $ah->interp->set_escape( h => \&RT::Interface::Web::EscapeUTF8 );
107a109,126
> =head2 EscapeUTF8 SCALARREF
>
> does a css-busting but minimalist escaping of whatever html you're
passing in.
>
> =cut
>
> sub EscapeUTF8  {
>         my  $ref = shift;
>         $$ref =~ s/&/&/g;
>         $$ref =~ s/</</g;
>         $$ref =~ s/>/>/g;
>         $$ref =~ s/\(/(/g;
>         $$ref =~ s/\)/)/g;
>
>
> }
>
> # }}}




More information about the Rt-devel mailing list