diff --git a/src/applications/differential/view/revisioncomment/DifferentialRevisionCommentView.php b/src/applications/differential/view/revisioncomment/DifferentialRevisionCommentView.php index 6afba23976..d66950a51d 100644 --- a/src/applications/differential/view/revisioncomment/DifferentialRevisionCommentView.php +++ b/src/applications/differential/view/revisioncomment/DifferentialRevisionCommentView.php @@ -114,14 +114,16 @@ final class DifferentialRevisionCommentView extends AphrontView { $num = $this->commentNumber; if ($num && !$this->preview) { Javelin::initBehavior('phabricator-watch-anchor'); + $anchor_name = 'comment-'.$num; $info[] = phutil_render_tag( 'a', array( - 'name' => 'comment-'.$num, - 'href' => '#comment-'.$num, + 'name' => $anchor_name, + 'id' => $anchor_name, + 'href' => '#'.$anchor_name, ), 'Comment D'.$comment->getRevisionID().'#'.$num); - $comment_anchor = 'anchor-comment-'.$num; + $comment_anchor = 'anchor-'.$anchor_name; } $info = implode(' · ', array_filter($info)); diff --git a/src/applications/maniphest/view/transactiondetail/ManiphestTransactionDetailView.php b/src/applications/maniphest/view/transactiondetail/ManiphestTransactionDetailView.php index 0c345921f2..51118261a9 100644 --- a/src/applications/maniphest/view/transactiondetail/ManiphestTransactionDetailView.php +++ b/src/applications/maniphest/view/transactiondetail/ManiphestTransactionDetailView.php @@ -1,7 +1,7 @@ commentNumber; if ($num && !$this->preview) { Javelin::initBehavior('phabricator-watch-anchor'); + $anchor_name = 'comment-'.$num; $info[] = javelin_render_tag( 'a', array( - 'name' => 'comment-'.$num, - 'href' => '#comment-'.$num, + 'name' => $anchor_name, + 'id' => $anchor_name, + 'href' => '#'.$anchor_name, ), 'Comment T'.$any_transaction->getTaskID().'#'.$num); - $comment_anchor = 'anchor-comment-'.$num; + $comment_anchor = 'anchor-'.$anchor_name; } - $info = implode(' · ', array_filter($info)); return phutil_render_tag(