Wikibase has a useful feature where plain wikilinks in edit summaries are formatted with the label of the entity, which is very useful when looking e.g. at page histories:
[[Property:P735]]: [[Q463035]]
→
However, the way this is implemented actually affects all links on diff and history URLs – specifically, this includes links in page content shown on diffs. This causes performance issues (T140879: WMFTimeoutException when loading some diffs on Wikidata [Timebox 8h]), but it’s also undesirable regardless of that – the content of a page looks different in diff and regular views, which is strange. For example:
Here’s the original appearance of my sandbox:
Then, I purged it without loading the result: curl --data-binary @- 'https://www.wikidata.org/w/index.php?title=User:Lucas_Werkmeister_(WMDE)/sandbox&diff=1505856440&oldid=1463378660&diffmode=source&action=purge' < /dev/null
And then loaded the diff: https://www.wikidata.org/w/index.php?title=User:Lucas_Werkmeister_(WMDE)/sandbox&diff=1505856440&oldid=1463378660&diffmode=source
And not only are there entity labels in the diff view – because this ends up in the parser cache, those labels will also be shown on subsequent non-diff views:
We should fix this, and only apply this special formatting to links that are actually in edit summaries. (Edited to add: and on special pages, such as Special:AllPages.)