We show page previews to the same page.
This is particularly a problem with backlinks e.g. the "^" (reference back link) in Notes section of https://en.wikipedia.org/w/index.php?title=Code_page_437 (see bug report T212419 for that particular case)
Hover over "Section links"
Expected: No page preview
Actual: page preview to somewhere else in the page.
- If a link points to the same page (e.g. hash fragment or self link), it should not show a preview.
- If a link points to another URL with a hash fragment, we show a preview for the other page.
See also: T156041
This might be very easy to fix just by adding another entry to the BLACKLISTED_LINKS array at the beginning of the file src/index.js.
A better, more sustainable way to fix this might be to always exclude the own page. Note this should only be done for the page popup type, not for the planned reference popup type.
Links to blacklist:
- mw-cite-backlink a