Permalink button doesn't work with url that contains anchors

Issue

with blob_overflow_menu enabled, the permalink button does work with links that include url.

Steps to reproduce

for more context, see slack (internal)

Notes on user experience

we never explicitly support this in the old permalink flow either. however, since the button updates the address bar before, it does allow a much easier copying and pasting experience. with the new flow, it would require user to "assemble" the link together, which is quite tedious.

Implementation Plan

See #537733 (comment 2474040138)

Note, this should also resolves #521756 (closed)

Edited by Chaoyue Zhao