Add a regression test for #372

This test ensures that links with anchors are parsed when the
:safe_links_only option is enabled.