how to escape the underscore in a link

Posted on 2010-08-12
Last Modified: 2012-05-10

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?

Question by:cgray1223
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
  • 2

Expert Comment

ID: 33421529
In HTML, the escape code for underscore is _

Expert Comment

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:



Author Comment

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

Accepted Solution

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?

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Search Item in Table 2 43
Use Mid in Html 6 23
Session on Html 8 42
Telerik RadEditor Control Save 8 16
Encryption for Business Encryption ( ensures the safety of our data when sending emails. In most cases, to read an encrypted email you must enter a secret key that will enable you to decrypt the email. T…
Worried about if Apple can protect your documents, photos, and everything else that gets stored in iCloud? Read on to find out what Apple really uses to make things secure.
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

726 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