Usage

edit
{{#invoke:fedi-share|link|This is a
multi-line post
With a #hashtag}}

gives a link as:

https://fedi-share.toolforge.org/?json=%22This+is+a+%5Cnmulti-line+post%5CnWith+a+%23hashtag%22