From ca85c457ebcb10533e8995868486ba15c7d19fe8 Mon Sep 17 00:00:00 2001 From: epriestley Date: Tue, 1 Oct 2013 09:37:18 -0700 Subject: [PATCH] Fix an issue where email is overquoted when attaching objects Summary: Currently, if you attach a revision to a task and the revision has a title with quotes or angle brackets in it, they are over-escaped in the email. Instead, don't do that. Test Plan: Attached `"QUOTES" MATH: 1 < 2` to a task, got a reasonable looking email. Reviewers: btrahan, chad Reviewed By: chad CC: aran Differential Revision: https://secure.phabricator.com/D7186 --- .../storage/PhabricatorApplicationTransaction.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/applications/transactions/storage/PhabricatorApplicationTransaction.php b/src/applications/transactions/storage/PhabricatorApplicationTransaction.php index b6f99d33cf..35b06f11b6 100644 --- a/src/applications/transactions/storage/PhabricatorApplicationTransaction.php +++ b/src/applications/transactions/storage/PhabricatorApplicationTransaction.php @@ -190,7 +190,7 @@ abstract class PhabricatorApplicationTransaction if ($this->renderingTarget == self::TARGET_HTML) { return $this->getHandle($phid)->renderLink(); } else { - return hsprintf('%s', $this->getHandle($phid)->getLinkName()); + return $this->getHandle($phid)->getLinkName(); } } @@ -199,7 +199,11 @@ abstract class PhabricatorApplicationTransaction foreach ($phids as $phid) { $links[] = $this->renderHandleLink($phid); } - return phutil_implode_html(', ', $links); + if ($this->renderingTarget == self::TARGET_HTML) { + return phutil_implode_html(', ', $links); + } else { + return implode(', ', $links); + } } public function renderPolicyName($phid) {