diff --git a/src/aphront/response/AphrontPlainTextResponse.php b/src/aphront/response/AphrontPlainTextResponse.php --- a/src/aphront/response/AphrontPlainTextResponse.php +++ b/src/aphront/response/AphrontPlainTextResponse.php @@ -16,7 +16,7 @@ public function getHeaders() { $headers = array( - array('Content-Type', 'text/plain'), + array('Content-Type', 'text/plain; charset=utf-8'), ); return array_merge(parent::getHeaders(), $headers); diff --git a/src/applications/feed/conduit/ConduitAPI_feed_query_Method.php b/src/applications/feed/conduit/ConduitAPI_feed_query_Method.php --- a/src/applications/feed/conduit/ConduitAPI_feed_query_Method.php +++ b/src/applications/feed/conduit/ConduitAPI_feed_query_Method.php @@ -95,7 +95,14 @@ $data = null; - $view = $story->renderView(); + try { + $view = $story->renderView(); + } catch (Exception $ex) { + // When stories fail to render, just fail that story. + phlog($ex); + continue; + } + $view->setEpoch($story->getEpoch()); $view->setUser($user); diff --git a/src/applications/feed/controller/PhabricatorFeedDetailController.php b/src/applications/feed/controller/PhabricatorFeedDetailController.php --- a/src/applications/feed/controller/PhabricatorFeedDetailController.php +++ b/src/applications/feed/controller/PhabricatorFeedDetailController.php @@ -20,6 +20,11 @@ return new Aphront404Response(); } + if ($request->getStr('text')) { + $text = $story->renderText(); + return id(new AphrontPlainTextResponse())->setContent($text); + } + $feed = array($story); $builder = new PhabricatorFeedBuilder($feed); $builder->setUser($user); @@ -32,7 +37,6 @@ $crumbs = $this->buildApplicationCrumbs(); $crumbs->addTextCrumb($title); - return $this->buildApplicationPage( array( $crumbs, diff --git a/src/applications/feed/story/PhabricatorFeedStoryCommit.php b/src/applications/feed/story/PhabricatorFeedStoryCommit.php --- a/src/applications/feed/story/PhabricatorFeedStoryCommit.php +++ b/src/applications/feed/story/PhabricatorFeedStoryCommit.php @@ -90,10 +90,16 @@ } if ($author) { - $text = "{$committer} (authored by {$author})". - "committed {$commit_name} {$commit_uri}"; + $text = pht( + '%s committed %s (authored by %s).', + $committer, + $commit_name, + $author); } else { - $text = "{$committer} committed {$commit_name} {$commit_uri}"; + $text = pht( + '%s committed %s.', + $committer, + $commit_name); } return $text; diff --git a/src/applications/transactions/feed/PhabricatorApplicationTransactionFeedStory.php b/src/applications/transactions/feed/PhabricatorApplicationTransactionFeedStory.php --- a/src/applications/transactions/feed/PhabricatorApplicationTransactionFeedStory.php +++ b/src/applications/transactions/feed/PhabricatorApplicationTransactionFeedStory.php @@ -69,6 +69,7 @@ $old_target = $xaction->getRenderingTarget(); $new_target = PhabricatorApplicationTransaction::TARGET_TEXT; $xaction->setRenderingTarget($new_target); + $xaction->setHandles($this->getHandles()); $text = $xaction->getTitleForFeed($this); $xaction->setRenderingTarget($old_target); return $text;