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:
		@@ -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(
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user