Random insert of character %20 in an HMTL email content

An aleatory (random) mistake happens when sending an email from a webApp.
The character %20 is included in the HTML of the email, not always in the same place, but as it represent an space in HTML, it does not affect the normal reading of a text, but it do affects when it is inserted in a link that it is included in the email, for instance the following link:
Of course the links is made by code including some variables that are part of the link passed as parameters. In one of those parameters the %20 character was inserted, and not by my code. And it is aleatory inserted in the email.
As it is very wired, someone have any idea of how to solve this and avoid those characters unexpected insertions ?
Thanks !!!

What do you mean with aleatory? Random?

You should always encode your urls in emails properly. Other than that, I can’t really say anything without seeing your code. And no data is inserted randomly into your email.

1 Like

Sorry for my english… Random is the right word. I had already changed in the text…

@Beatrix_Willius, sorry… as you said “no data is inserted randomly”… Since I am including the code you asked for I noticed my mistake in my code.
Thanks and sorry again.