Steps to reproduce:
* Create a change with the autocomment `/* A&B&C&D&E */ [[#A&B&C&D&E]]` in summary
* Open [[ http://localhost/w/index.php?title=Foo&action=history | history ]]. The summary contains:
> (→A&B&C&D&E: #A&B&C&D&E)
With the links http://localhost/w/index.php?title=Foo#A.26B.26C.26amp.3BD.26amp.3Bamp.3BE and http://localhost/w/index.php?title=Foo#A.26B.26C.26D.26amp.3BE
* Open the [[ http://localhost/w/index.php?title=Foo&diff=curr | diff ]]. The summary contains:
> (→A&B&C&D&E: #A&B&C&D&E)
With the links [[ http://localhost/mediawiki/index.php?title=Hauptseite3&diff=curr#A.26B.26C.26D.26amp.3BE | #A.26B.26C.26D.26amp.3BE ]] and [[ http://localhost/mediawiki/index.php?title=Hauptseite3&diff=curr#A.26B.26C.26D.26amp.3BE | #A.26B.26C.26D.26amp.3BE ]]
The fragment encoding of the second link does not differ. Because of T103714 it is double encoded.
The fragment encoding of the first link link differ.
Expected result: The fragment encoding of the first link should not differ.