ChangeTags: Fix double escaping of tag descriptions
authorRoan Kattouw <roan.kattouw@gmail.com>
Tue, 21 Aug 2018 01:54:39 +0000 (18:54 -0700)
committerRoan Kattouw <roan.kattouw@gmail.com>
Tue, 21 Aug 2018 01:54:39 +0000 (18:54 -0700)
truncateTagDescription() was escaping its return value for HTML, even
though it had just produced plain text, and all similar functions
return plain text as well.

Bug: T192509
Change-Id: Ieaa631ef19c235121af9d8e09f2674f54fa3c25a

includes/changetags/ChangeTags.php

index b5bf488..9a015f4 100644 (file)
@@ -201,9 +201,8 @@ class ChangeTags {
                }
 
                $taglessDesc = Sanitizer::stripAllTags( $originalDesc->parse() );
-               $escapedDesc = Sanitizer::escapeHtmlAllowEntities( $taglessDesc );
 
-               return $context->getLanguage()->truncateForVisual( $escapedDesc, $length );
+               return $context->getLanguage()->truncateForVisual( $taglessDesc, $length );
        }
 
        /**