Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

how to escape the underscore in a link

Posted on 2010-08-12
4
397 Views
Last Modified: 2012-05-10
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
Comment
Question by:cgray1223
  • 2
4 Comments
 
LVL 1

Expert Comment

by:earthsound
ID: 33421529
In HTML, the escape code for underscore is _
0
 
LVL 1

Expert Comment

by:boboudreau
ID: 33421583
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
 

Author Comment

by:cgray1223
ID: 33422574
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
 
LVL 1

Accepted Solution

by:
boboudreau earned 500 total points
ID: 33422724
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

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
There are many Password Managers (PM) out there to choose from. PM's can help with your password habits and routines, but they should not be a crutch you rely on too heavily. I also have an article for company/enterprise PM's.
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question