Teamcity support for encoded '&' in URLs?

I'm having an issue where I need to pass a teamcity build results URL (such as through a couple disconnected processes running bash scripts and the '&' is is causing issues when the URL is passed as an env variable ... the text to the right of the variable is being run in the background when I try to set the variable.  Beautiful.  I've tried wrapping the url in quotes but there are some sub functions that also process the variable and calls to eval so the quotes get stripped off.

Using a public jetbrains url as an example when encode the ampersnd as '%26' so the URL is like this, but teamcity doesn't recognize it.

I have an alternate solution of creating a tiny url but I don't like the idea of depending on always being available.  I'm sure it is I just don't like the dependency.

Any thoughts on how to obtain a bash compliant teamcity url would be greatly appreciated!

Comment actions Permalink

You can use Linux's coreutil base64.

Comment actions Permalink

Hi Sergey, do you mean encode the ampersand or entire url so that bash no longer executes on it?    If so then yes I agree, but the solution I was looking for was to not have to require any consumers to decode it back.    I'm going to implement a similar solution, actually just with sed but then I need to make sure it always gets switched back.   I was hoping there was someway in teamcity would accept the hex code in the URL.   Some other server products do.

Nevertheless thanks for the reply.


Please sign in to leave a comment.