fix for bug 985737, relies on PR 82 on legal-docs

This is a bit of a hack, rewriting URLs for all uses of {% fetch %}, but for the time being the only places we use {% fetch %} is for legal docs that need their URLs rewritten. Happy to field suggestions for cleaner ways of doing this.