Solved

Firefox, POST '#' symbol

Posted on 2011-03-15
3
380 Views
Last Modified: 2013-12-13
Hello,

We currently had one of our programmers create a simple web inventory search application. After searching for part numbers and returning results, you are allowed to 'ADD' parts that you want by email.

Before going on to the email form, the part numbers are sent using POST. The email form should display all of the parts that were added but part numbers with a '#' symbol do not show up. This works fine in IE but not in Firefox.

I am told by the programmer that Firefox uses the '#' symbol as a separator therefore nothing can be done. Is this true? I'm sure there are ways to work around this and any advice or information would be greatly appreciated.

Thanks,
Kei
0
Comment
Question by:sflory
  • 2
3 Comments
 
LVL 16

Expert Comment

by:sjklein42
ID: 35140184
In the part number, you can first do a string replace of naked '#' symbols with '#'


http://www.theukwebdesigncompany.com/articles/entity-escape-characters.php
0
 
LVL 82

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 35140269
'#' is a reserved symbol and should be encoded in URIs.  http://en.wikipedia.org/wiki/Percent-encoding  You shouldn't count on it continuing to work in IE and it may not work in Chrome, Safari, or Opera either.  Here's the PHP page for doing that: http://us2.php.net/manual/en/function.urlencode.php
0
 
LVL 16

Expert Comment

by:sjklein42
ID: 35140367
Oh, the '#' is in the URL.  That makes more sense.  I couldn't figure out why it would be causing a problem in HTML.

As @DaveBaldwin correctly pointed out, in an URL, you would replace naked '#' symbols with '%23'

So instead of this:

www.mydomain.com/inventory.cgi?part=ABC#DEF

you would have this:

www.mydomain.com/inventory.cgi?part=ABC%23DEF

0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

I recently found myself in a Corporate Situation where the client had requested blocking access to any and all websites except his own Domain? Easy? I am sure this would be your answer but their requirement was, this has to be done without using…
Do you come here a lot? Are you lazy like me and don't want to go through the "trouble" of having to click your Dock's Safari icon and then having to click your Experts Exchange Favorites bookmark to get here? Well then this article is for you.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

744 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now