[Rt-commit] rt branch, 4.4/respect-article-escape-html-in-includearticle, created. rt-4.4.4-82-g04f07c7132

Craig Kaiser craig at bestpractical.com
Tue Jan 21 15:09:42 EST 2020


The branch, 4.4/respect-article-escape-html-in-includearticle has been created
        at  04f07c7132225b5aa762885a01b19ed6dc128557 (commit)

- Log -----------------------------------------------------------------
commit 04f07c7132225b5aa762885a01b19ed6dc128557
Author: Craig Kaiser <craig at bestpractical.com>
Date:   Tue Jan 21 14:17:07 2020 -0500

    Do not encode HTML if skip Escape HTML option selected

diff --git a/share/html/Articles/Elements/IncludeArticle b/share/html/Articles/Elements/IncludeArticle
index ce9714518c..21e71daf21 100644
--- a/share/html/Articles/Elements/IncludeArticle
+++ b/share/html/Articles/Elements/IncludeArticle
@@ -86,7 +86,8 @@ foreach my $arg ( keys %$parent_args ) {
 
     $m->callback( Article => $article, Ticket => $Ticket, formatted_article => \$formatted_article, ARGSRef => \%ARGS );
 
-    if (RT->Config->Get('MessageBoxRichText',  $session{'CurrentUser'})) {
+    my $class = $article->ClassObj;
+    if ( not $class->FirstAttribute("Skip-EscapeHTML") && RT->Config->Get('MessageBoxRichText',  $session{'CurrentUser'}) {
         $formatted_article =~ s/>/>/g;
         $formatted_article =~ s/</</g;
         $formatted_article =~ s/&/&/g;

-----------------------------------------------------------------------


More information about the rt-commit mailing list