Single quote (apostrophe) in hyperlink

1134
8
04-03-2019 12:41 PM
WilliamBuerger
Occasional Contributor

We're trying to hyperlink in ArcPro to some documents that have a single quote/apostrophe in the path.  Clicking the link gives the error...

Any attempt to escape the character doesn't change the error.  I've tried double single quotes and %27 and it still gives the same error.  The fact that %27 gives the same error suggests that it reads the urlencode correctly and makes it a single quote before passing it on to whatever causes this error.  Anyone know how to get around this?  The obvious work around is to rename the folders to not have single quotes in them.  But single quotes are valid characters in normal urls.  So this seems to be a bug in the way Pro handles this.

Tags (1)
0 Kudos
8 Replies
JoshuaBixby
MVP Esteemed Contributor

I am seeing the same behavior, and I can't seem to get around it, definitely seems like a bug to me.

0 Kudos
WilliamBuerger
Occasional Contributor

Thanks for confirming that it wasn't just me.

0 Kudos
TedKowal
Regular Contributor II

I am assuming you are using python ..... using this method has sometimes help me when I get weird errors from urlencode(s) ...

convert to JSON using json.dumps() and then use urlencode or b64encode to make it safe for use in an url....

18.2. json — JSON encoder and decoder — Python 2.7.16 documentation 

Don't know it it is worth trying .... I don't use ArcPro due to it not accepting an access geodatabase.  Slowly learning QGIS because shapefiles, file geodatabases or SDE are not an option for the company I work at and had similar %27 issues... in scripting for QGIS....

0 Kudos
WilliamBuerger
Occasional Contributor

No scripting involved.  Just populating a text field with a link to a document.  Something like this...

<a href="file:///\\server\share\documents (PDF's)\target.pdf">Target Document</a>

If the path doesn't have a single quote in it, it works.  If it does, it fails.

0 Kudos
KoryKramer
Community Moderator

I just logged [BUG-000121514: When an apostrophe is included in a filename, clicking on the link from a pop-up returns a script error: Expected ')']

You can contact technical support if you need to be attached to follow the status.

Thank you.

NickHarvey
Occasional Contributor II

Just updated to Pro 2.8.0.  Document hyperlinks are opening as expected but single quotes are giving me trouble.  Anyone else having this issue?

-Nick

0 Kudos
NickHarvey
Occasional Contributor II

BUG-000140068

0 Kudos
NickHarvey
Occasional Contributor II

This appears to be working at 2.8.2 best I can tell 

0 Kudos