From c7a84876c9a697d2b6684e9e1c78d784f4cbb03c Mon Sep 17 00:00:00 2001 From: epriestley <git@epriestley.com> Date: Tue, 13 Aug 2013 10:11:47 -0700 Subject: [PATCH] Add some missing rendering code to textual feed stories Summary: Ref T2852. Token given stories currently try to `strip_tags()` a `PHUIFeedView` or similar, which doesn't work. Cast it to a string before stripping. This is super gross but I don't want to clean it up until after ApplicationTransactions so we can really clean up all of Feed. Test Plan: Ran `bin/feed republish <id>` on a feed story about giving a token to a revision. Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T2852 Differential Revision: https://secure.phabricator.com/D6733 --- src/applications/tokens/feed/PhabricatorTokenGivenFeedStory.php | 2 +- .../feed/PhabricatorApplicationTransactionFeedStory.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/applications/tokens/feed/PhabricatorTokenGivenFeedStory.php b/src/applications/tokens/feed/PhabricatorTokenGivenFeedStory.php index e1ec46e0de..3fd1daf195 100644 --- a/src/applications/tokens/feed/PhabricatorTokenGivenFeedStory.php +++ b/src/applications/tokens/feed/PhabricatorTokenGivenFeedStory.php @@ -35,7 +35,7 @@ final class PhabricatorTokenGivenFeedStory public function renderText() { // TODO: This is grotesque; the feed notification handler relies on it. - return strip_tags($this->renderView()->render()); + return strip_tags(hsprintf('%s', $this->renderView()->render())); } } diff --git a/src/applications/transactions/feed/PhabricatorApplicationTransactionFeedStory.php b/src/applications/transactions/feed/PhabricatorApplicationTransactionFeedStory.php index 57190e00d0..5e48c6dfc4 100644 --- a/src/applications/transactions/feed/PhabricatorApplicationTransactionFeedStory.php +++ b/src/applications/transactions/feed/PhabricatorApplicationTransactionFeedStory.php @@ -57,7 +57,7 @@ class PhabricatorApplicationTransactionFeedStory public function renderText() { // TODO: This is grotesque; the feed notification handler relies on it. - return strip_tags($this->renderView()->render()); + return strip_tags(hsprintf('%s', $this->renderView()->render())); } }