More

Hyperlink Not Accepting '&' Symbol


I am using Esri's Operations Dashboard and trying to insert a hyperlink into the Feature Details widget. The problem appears to be the '&' symbol. When the hyperlink is clicked, the '&' sign disappears in the url and I receive an error message.

To account for the HTML I entered this:

Which became this:

And resulted in this:

And displayed this error message:


Okay, after much trial and error I have figured it out.

I had to use a combination of URL encoding and HTML encoding.

In the end, there were 3 symbols the software/browser/server was having trouble with: '&', '{', and '}'

For the '&', HTML encoding was needed.

For the '{', HTML or URL encoding was accepted.

For the '}', URL encoding was needed.

In order to get the hyperlink to work I had to delete everything and then go back and enter the new url into the system.

The end encoded result: http://www.mycompany.net/records/personal/details.asp?taxyear=2015& ;ppt=A& ;acct=%7Bacct%7D

I added the spaces between amp ; so this site would not automatically translate it to '&'. The actual encoded url does not contain those spaces.

And after all of that, I needed to submit the hyperlink, click ok for the widget, then go back into the edit mode again and once more click ok. If I only did the process once, then my hyperlinked field did not translate to the actual account. For some reason, going through the process twice jumpstarted the link and my {acct} was linked to the number.

Thank you to all who helped and Vince, Thomas B, user30184 and Mintx in particular for steering me in the correct direction.


You could use %26 instead of the &

Tool to encode for example http://meyerweb.com/eric/tools/dencoder/

If you can edit in plain html you could use this just for the href.