2

I have an issue with creating active hyperlinks in QGIS. My url (after I deleted the site name) originally looks like this:

?type=canvas_rendering#%7B%22frame%22:%7B%22id%22:481350%7D%7D

When I create an action in QGIS the normal way (Type-open, action-[% "url" %]), the links do not work as expected. It seems that QGIS is confused by the % sign inside the url and changes the exact name of the url by adding the number 25 after each % sign:

?type=canvas_rendering#%257B%2522frame%2522:%257B%2522id%2522:481350%257D%257D%0A

My url comes from a json object encoded to be compatible with JavaScript’s encodeURI() function to obtain a valid URL. I first assumed that it re-encodes the url but I tried with the original JSON object and didn't work.

I would like to ask if someone knows how to tell QGIS to open the exact url as it is in my attribute without being confused by the % sign

  • What happens if you use the non-url-encoded format canvas_rendering#{"frame":{"id":481350}}? – user30184 Nov 3 '16 at 11:45
  • @user30184 Thanks for the comment. I tried many different versions of the non-encoded url but none has worked (this is what I wanted to say by writing: " I first assumed that it re-encodes the url but I tried with the original JSON object and didn't work"). In any case, I would like to find a solution using the encoded version of the urls for other reasons. Of course any kind of workaround is very welcome. – HliasK Nov 3 '16 at 11:56

Your Answer

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

Browse other questions tagged or ask your own question.