Thank you. Already modified the script so it encodes directly the URL. Sorry for the troubles!
Hello @mohammedeisa
A few hours after creating this threadI realized the problem was with the hosting. It couldn’t come from us. I tried to install a clean wordpress site in the root and the same issues showed up, so I figured it must be from the hosting. Already called and they are fixing it up atm. Honestly it still seems a weird error if it comes from the hosting. Thanks for the response and sorry for the fuss!