I should add that I am inserting it into a table - not sure if that can have an influence:
|Inhabilitet|Der er krav til almindelig habilitet, (blablabla).|Forvaltningsloven (FVL) Kap. 2, §§4-6 https://www.retsinformation.dk/forms/r0710.aspx?id=161411#Kap2|
---
Interestingly, if I post the link directly into the Grav post, the link comes out right.
Grav uses the id part in the URL and adds it as the id of the link HTML element. You can check that in the browser inspector. Add &noprocess at the end of the URL. See Pass-through Supported Attributes