mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 14:00:56 +01:00
Prevent Differential changeset HTML anchors from colliding with comment anchors
Summary: Fixes T12970. This is easier than I expected, and appears to occur in only one place. This prevents a change from ever generating with an anchor like `#12345678`, which is ambiguous because it may be a comment anchor. Test Plan: Viewed a revision, saw new `change-xxxyyyzzz` anchors, clicked one, got jumped to the right place. Reviewers: chad Reviewed By: chad Maniphest Tasks: T12970 Differential Revision: https://secure.phabricator.com/D18465
This commit is contained in:
parent
bc0963d54b
commit
ba1925b155
1 changed files with 1 additions and 1 deletions
|
@ -170,7 +170,7 @@ final class DifferentialChangeset extends DifferentialDAO
|
|||
}
|
||||
|
||||
public function getAnchorName() {
|
||||
return substr(md5($this->getFilename()), 0, 8);
|
||||
return 'change-'.PhabricatorHash::digestForIndex($this->getFilename());
|
||||
}
|
||||
|
||||
public function getAbsoluteRepositoryPath(
|
||||
|
|
Loading…
Reference in a new issue