I'm configuring a basic pop-up within a Web Map using Arcade expressions. For one of them I build a URL from an intersecting layer which is passed through to an image to be clicked. When I test the expression the result is what is expected. However, when I click on the image to which the expression is attached the URL is returned with "amp;" added directly after the "&" which breaks the link.
And test results:
Actual passed URL:
I've tried UrlEncode() on both the full string as well as just the & and while it does encode the URL does not work. I've also tried encapsulating in text() but the & still gets converted at some point.