Page MenuHomePhabricator

When a user introduces an internal link with an anchor, VisualEditor silently trims it
Closed, DuplicatePublic

Description

fwiw, this is the most annoying problem I'm having with VE these days...

  1. Copy an internal link with an anchor, i.e. Developer Relations/Planning#Quarterly goals.
  2. In a page opened with VisualEditor, select a string and click the link icon.
  3. Paste the internal link with the anchor and click Done.
  4. Save the page.

EXPECTED
The string now links to the internal link with the link.

ACTUALLY
The link points to the page, but the anchor is gone without any notice.

The user must "edit source" and add the anchor manually (if they have noticed the problem testing the link). You can see an example at https://www.mediawiki.org/w/index.php?title=Developer_Relations%2FGoals&type=revision&diff=1945145&oldid=1945141