Vehemently disagree. The method I propose uses two URL schemes:
dynalist://https://
With two schemes, you don’t need to snip and encode… you just pre-pend the original URL with dynalist://
https://dynalist.io/d/xxxxxxxxxxxxxx#z=xxxxxxxxxxxxxxx
… becomes
dynalist://https://dynalist.io/d/xxxxxxxxxxxxxx#z=xxxxxxxxxxxxxxx
It may be uglier, but it is way simpler, and faster to create.
With a single url scheme, first you must snip the Dynalist path and hash:
d/xxxxxxxxxxxxxx#z=xxxxxxxxxxxxxxx
Then encode it to this:
d%2Fxxxxxxxxxxxxxx%23z%3Dxxxxxxxxxxxxxxx
Then prepend with the scheme, command and parameter
dynalist://open?path=d%2Fxxxxxxxxxxxxxx%23z%3Dxxxxxxxxxxxxxxx