1

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:

enter image description here

Which became this:

enter image description here

And resulted in this:

enter image description here

And displayed this error message:

enter image description here

3
  • It is very difficult to read from your screenshot. Just to confirm you are using this & (&amp followed by a semi-colon) and not by a colon, correct?
    – GeoSharp
    Oct 8, 2015 at 15:48
  • Correct, I am using a semi-colon after the &amp
    – MapinTX
    Oct 8, 2015 at 15:53
  • 1
    Using HTML encoding on a URL isn't likely to work, but using URLencoding is.
    – Vince
    Oct 8, 2015 at 16:48

2 Answers 2

4

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&amp ;ppt=A&amp ;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.

2

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.

6
  • Yes, URLencoding is the way to go here
    – Vince
    Oct 8, 2015 at 16:45
  • Thanks; I didn't know that tool existed. Unfortunately it did not solve my problem. I entered in the encoded string and once clicked, the browser url was missing the '&'s which resulted in the error message displaying again.
    – MapinTX
    Oct 8, 2015 at 18:14
  • You may need to escape the '%' as '%%' or '\%', depending on how the data is processed
    – Vince
    Oct 8, 2015 at 18:18
  • But isn't & used here as a part of a http query string and therefore there should be no need to url-encode it?
    – user30184
    Oct 8, 2015 at 19:09
  • I have tried both %% and \% but neither worked. My '&' is still missing.
    – MapinTX
    Oct 8, 2015 at 19:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.