Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 435
  • Last Modified:

how to escape the underscore in a link

Hello,

I'm building a link that has an encrypted key that we generate and that key can include the underscore character.  I'm using the below link to post to some social sites and when the user clicks the link it strips off the "_".  Any ideas on how to escape this or how to build the link so that the "_" is included in the users request?

http://mysite/EDG_
0
cgray1223
Asked:
cgray1223
  • 2
1 Solution
 
earthsoundCommented:
In HTML, the escape code for underscore is _
0
 
boboudreauCommented:
You can try replacing the underscore with the unicode equivalent (perhaps they don't check for this value).

Any of these should work:

&#000005F
&#00005F
&#0005F
&#005F
&#05F
&#5F

0
 
cgray1223Author Commented:
maybe it's a facebook issue as other social sites handle it, but when I paste in http://linkcontextroot/EM6_;  the escape code doesn't get converted to the _.  I need the _ to be interpreted as a _.  I tried the Unicodes as well
0
 
boboudreauCommented:
Can you try to handle this instead on your server?  I.e., if facebook won't change &#95 or &#005F, can you decrypt those into ASCII before using that string as a key for your web application?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now