In T165535 I was attempting to use Sanitizer::removeHTMLtags() to remove all of the HTML tags from the parsed wikitext except for anchor tags. However, I noticed that the href attribute was always stripped from the anchor. Upon further investigation, I found this note:
this also drops all relative URLs
We should, at a minimum, support root-relative links.