From 08e7b6f79f6f71a6de09726e7d29aa31edd6639c Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 1 Feb 2016 09:37:40 -0800 Subject: [PATCH] Fix object extraction from user profile blurbs Summary: Fixes T10242. Currently, we don't extract files, mentions, etc., properly from user profile blurbs. Test Plan: Uploaded a file to my profile blurb, saw it attach properly. Reviewers: chad Reviewed By: chad Maniphest Tasks: T10242 Differential Revision: https://secure.phabricator.com/D15153 --- .../customfield/PhabricatorUserBlurbField.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/applications/people/customfield/PhabricatorUserBlurbField.php b/src/applications/people/customfield/PhabricatorUserBlurbField.php index 3221a33202..04fb419918 100644 --- a/src/applications/people/customfield/PhabricatorUserBlurbField.php +++ b/src/applications/people/customfield/PhabricatorUserBlurbField.php @@ -58,6 +58,13 @@ final class PhabricatorUserBlurbField ->setLabel($this->getFieldName()); } + public function getApplicationTransactionRemarkupBlocks( + PhabricatorApplicationTransaction $xaction) { + return array( + $xaction->getNewValue(), + ); + } + public function renderPropertyViewLabel() { return null; } @@ -67,10 +74,11 @@ final class PhabricatorUserBlurbField if (!strlen($blurb)) { return null; } - return PhabricatorMarkupEngine::renderOneObject( - id(new PhabricatorMarkupOneOff())->setContent($blurb), - 'default', - $this->getViewer()); + + $viewer = $this->getViewer(); + $view = new PHUIRemarkupView($viewer, $blurb); + + return $view; } public function getStyleForPropertyView() {