1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-23 22:10:55 +01:00

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
This commit is contained in:
James Rhodes 2014-08-27 08:28:45 +10:00
parent ddfa5cbdf6
commit 0988ddbf2f

View file

@ -64,10 +64,11 @@ final class PonderQuestionTransaction
case self::TYPE_ANSWERS: case self::TYPE_ANSWERS:
$answer_handle = $this->getHandle($this->getNewAnswerPHID()); $answer_handle = $this->getHandle($this->getNewAnswerPHID());
$question_handle = $this->getHandle($object_phid); $question_handle = $this->getHandle($object_phid);
return pht( return pht(
'%s answered %s', '%s answered %s',
$this->renderHandleLink($author_phid), $this->renderHandleLink($author_phid),
$answer_handle->renderLink($question_handle->getFullName())); $this->renderHandleLink($object_phid));
case self::TYPE_STATUS: case self::TYPE_STATUS:
switch ($new) { switch ($new) {
case PonderQuestionStatus::STATUS_OPEN: case PonderQuestionStatus::STATUS_OPEN: