Yeah I think I remember now, the method being used on the downloadlink is copy which causes errors when trying to use url_encode, that's why I used str_replace.

It is exactly the same, but the files were restructured since the PR so I had to redo it