Script launching web page: url morphs along the way

I am trying to build and launch a url, but it seems to mysteriously morph somewhere along the way.

The portion of the script shows:

var url = "" + encodeURIComponent(" " + tt); DOpus.Output(tt); DOpus.Output(url); cmd.RunCommand(url);

The console correctly outputs:

[quote]Die fetten Jahre sind vorbei ... d%20vorbei

If I manually paste the second line of the console in the Firefox address bar, i.e.
it works perfectly.

But in the browser, the url displayed is:

It's as though the %20 spaces morph into zeroes.

If I try to bypass the %20 completely, only the left part of the url makes it:
Code => var url = " " + tt.replace(/ /g,"-");
Console=> Die-fetten-Jahre-sind-vorbei

Would anyone happen to have insights on this?

Try doubling up on the percentage chars - e.g. %%20 instead of %20. I seem to recall encountering something similar in the past.

Regards, AB

@AB Thank you, escaping the % works like a charm!