Steps to reproduce:
- Write a page that contains [https://phabricator.wikimedia.org/T143350]
- Open it in the visual mode, copy the whole thing, and paste it (also in the visual mode).
- Discover that the link has been pasted as [https://phabricator.wikimedia.org/T143350 <nowiki>[1]</nowiki>]
(There were some other errors in pasting https://meta.wikimedia.org/w/index.php?title=VisualEditor/Newsletter/2018/February&oldid=17775503 as well.)