When importing a work from an external site, the StoryParser turns all anchor links (eg `#notes`) to absolute links that refer back to the original site. As these are probably going to be internal links that should be kept on AO3 (chapter links, hypertext cross-references, links to individual end notes), we should keep them as is.
https://github.com/otwcode/otwarchive/blob/be81dfa7d28382286186dd820fdf4e31bdd5ef4f/app/models/story_parser.rb#L554-L561 should be changed to exclude anchor links.
When importing a work which contains links to anchors within the document (eg: #notes), the links should no longer be turned into absolute links to the external site url.
This doesn't mention needing to use the temporary site, so I just tested as a regular user. I posted an entry on Dreamwidth with the content:
When I imported it, the anchor kept me on the page on the Archive: https://test.archiveofourown.org/works/1069453