diff --git a/src/applications/differential/view/DifferentialRevisionCommentView.php b/src/applications/differential/view/DifferentialRevisionCommentView.php index 0c78345757..83b7d494ed 100644 --- a/src/applications/differential/view/DifferentialRevisionCommentView.php +++ b/src/applications/differential/view/DifferentialRevisionCommentView.php @@ -180,10 +180,11 @@ final class DifferentialRevisionCommentView extends AphrontView { } else { $xaction_view->setEpoch($comment->getDateCreated()); if ($this->anchorName) { - $anchor_name = $this->anchorName; - $anchor_text = 'D'.$comment->getRevisionID().'#'.$anchor_name; + $anchor_text = + 'D'.$comment->getRevisionID(). + '#'.preg_replace('/^comment-/', '', $this->anchorName); - $xaction_view->setAnchor($anchor_name, $anchor_text); + $xaction_view->setAnchor($this->anchorName, $anchor_text); } } diff --git a/src/applications/maniphest/view/ManiphestTransactionDetailView.php b/src/applications/maniphest/view/ManiphestTransactionDetailView.php index 7ed66c4875..320b577c04 100644 --- a/src/applications/maniphest/view/ManiphestTransactionDetailView.php +++ b/src/applications/maniphest/view/ManiphestTransactionDetailView.php @@ -206,7 +206,9 @@ final class ManiphestTransactionDetailView extends ManiphestView { $xaction_view->setEpoch($any_transaction->getDateCreated()); if ($this->commentNumber) { $anchor_name = 'comment-'.$this->commentNumber; - $anchor_text = 'T'.$any_transaction->getTaskID().'#'.$anchor_name; + $anchor_text = + 'T'.$any_transaction->getTaskID(). + '#'.$this->commentNumber; $xaction_view->setAnchor($anchor_name, $anchor_text); }