From 0988ddbf2f4c4030b656f0405b117b7eaa957bc2 Mon Sep 17 00:00:00 2001 From: James Rhodes Date: Wed, 27 Aug 2014 08:28:45 +1000 Subject: [PATCH] Don't render HTML for "user answered question" transaction if the rendering target is not HTML Summary: Resolves T5817. Continuation of D10231. This corrects the rendering of the "user answered question" transaction so that it does not incorrectly attempt to render the question handle as HTML in emails if the rendering target is not HTML. Test Plan: Used `bin/mail show-outbound` to verify that the email didn't contain escaped HTML when answering a question. Reviewers: #blessed_reviewers, btrahan, epriestley Reviewed By: #blessed_reviewers, btrahan, epriestley Subscribers: epriestley, Korvin Maniphest Tasks: T5817 Differential Revision: https://secure.phabricator.com/D10319 --- src/applications/ponder/storage/PonderQuestionTransaction.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/applications/ponder/storage/PonderQuestionTransaction.php b/src/applications/ponder/storage/PonderQuestionTransaction.php index eb7aa03e88..32edeef72b 100644 --- a/src/applications/ponder/storage/PonderQuestionTransaction.php +++ b/src/applications/ponder/storage/PonderQuestionTransaction.php @@ -64,10 +64,11 @@ final class PonderQuestionTransaction case self::TYPE_ANSWERS: $answer_handle = $this->getHandle($this->getNewAnswerPHID()); $question_handle = $this->getHandle($object_phid); + return pht( '%s answered %s', $this->renderHandleLink($author_phid), - $answer_handle->renderLink($question_handle->getFullName())); + $this->renderHandleLink($object_phid)); case self::TYPE_STATUS: switch ($new) { case PonderQuestionStatus::STATUS_OPEN: