Hash/anchors are being stripped from URLs on mobile. How to stop that?

Because those header links are extremely fragile. This is what the one you gave looks like:

https://meta.discourse.org/t/-/148916#p-738234-cloudflare-r2-13

See that -13 at the end? It’s there because it’s the thirteenth heading. As soon as you add a new heading earlier in the document it breaks. And of course if you change the text of the heading it breaks.

When I say breaks, I mean changes in the target document. From what I can tell those anchors are generated dynamically when the page is loaded. So if you are using the TOC plugin changing the document is not a problem.

In our use case, this is a FAQ being linked to. So it is not uncommon to add new questions/headings.

But you are correct that Discourse seems to detect the pattern of those anchors and allows them through. But if it doesn’t match the expected pattern then it gets stripped.

They are just ordinary alphanumeric ids. So if I were trying to create an anchor for your example above I would just use cloudflare-r2.