[Rt-commit] r14032 - in rtfm/trunk: .
falcone at bestpractical.com
falcone at bestpractical.com
Fri Jul 11 17:19:51 EDT 2008
Author: falcone
Date: Fri Jul 11 17:19:51 2008
New Revision: 14032
Modified:
rtfm/trunk/ (props changed)
rtfm/trunk/html/Callbacks/RTFM/Elements/MessageBox/Default
Log:
r35482 at ketch: falcone | 2008-07-11 17:19:42 -0400
* work around escaping HTML for the new JS MessageBox on 3.8
Modified: rtfm/trunk/html/Callbacks/RTFM/Elements/MessageBox/Default
==============================================================================
--- rtfm/trunk/html/Callbacks/RTFM/Elements/MessageBox/Default (original)
+++ rtfm/trunk/html/Callbacks/RTFM/Elements/MessageBox/Default Fri Jul 11 17:19:51 2008
@@ -75,9 +75,22 @@
}
- $m->comp('/RTFM/Article/Elements/Preformatted',
+ my $formatted_article = $m->scomp('/RTFM/Article/Elements/Preformatted',
Article => $article, Ticket => $Ticket
);
+
+ # if we're on 3.8 and using the javascript MessageBox apply the
+ # escapse that the JS usually applies in HeaderJavascript.
+ if ($RT::VERSION =~ /^3\.8/) {
+ if (RT->Config->Get('MessageBoxRichText', $session{'CurrentUser'})) {
+ $formatted_article =~ s/>/>/g;
+ $formatted_article =~ s/</</g;
+ $formatted_article =~ s/&/&/g;
+ $formatted_article =~ s/\n/\n<br \/>/g;
+ }
+ }
+ $m->print($formatted_article);
+
}
return;
</%INIT>
More information about the Rt-commit
mailing list