From 0402a79e0e5723a54ecffaf5c6bc1c1d89cbe51b Mon Sep 17 00:00:00 2001 From: epriestley Date: Thu, 8 Feb 2018 09:46:56 -0800 Subject: [PATCH] Render object remarkup references in a text context as "Dxxx " Summary: Depends on D19031. Fixes T11389. Currently, we render `Dxxx` in a text context (plain text email) as just a URI. Instead, render it like `Dxxx `. This is more faithful to the original intent and preserves `T123/T456` as two separate, usable links. Test Plan: Wrote `T123/T234` in a task, pulled mail for it with `bin/mail show-outbound`, saw separate clickable links. Maniphest Tasks: T11389 Differential Revision: https://secure.phabricator.com/D19032 --- .../markup/rule/PhabricatorObjectRemarkupRule.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/infrastructure/markup/rule/PhabricatorObjectRemarkupRule.php b/src/infrastructure/markup/rule/PhabricatorObjectRemarkupRule.php index 35c0ecfad0..fbbfa36805 100644 --- a/src/infrastructure/markup/rule/PhabricatorObjectRemarkupRule.php +++ b/src/infrastructure/markup/rule/PhabricatorObjectRemarkupRule.php @@ -75,7 +75,7 @@ abstract class PhabricatorObjectRemarkupRule extends PhutilRemarkupRule { } if ($this->getEngine()->isTextMode()) { - return PhabricatorEnv::getProductionURI($href); + return $text.' <'.PhabricatorEnv::getProductionURI($href).'>'; } else if ($this->getEngine()->isHTMLMailMode()) { $href = PhabricatorEnv::getProductionURI($href); return $this->renderObjectTagForMail($text, $href, $handle);