http://doc.silverstripe.org/framework/en/3.1/reference/templates#anchor-link-rewriting
When rewriting href fragment anchor links, it appears that the link is written to include the url query string, however the ampersands (i.e. &) do not seem to be properly encoded (i.e. &).
I ran across this when trying to upgrade my site to 3.1.6 and ran ?flush=all. Apparently there is something called a flush token now, that gets appended to the query sting like ?flush=all&flushtoken=4abe001b7dd6842e8c0a6b290210d30a. And that gets put on my anchor link like href="/page?flush=all&flushtoken=4abe001b7dd6842e8c0a6b290210d30a#anchortext" and that un-encoded ampersand causes the site to not render.
Is this a bug, or do I have something setup wrong?
Addition:
This could be any query string:
http://domain.com/page?one=1&two=2
turns:
<a href="#anchortext">
to:
<a href="/page?one=1&two=2#anchortext">
when it should, I think, do:
<a href="/page?one=1&two=2#anchortext">