Solved

Firefox, POST '#' symbol

Posted on 2011-03-15
3
382 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 83

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

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

These days socially coordinated efforts have turned into a critical requirement for enterprises.
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
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 …
Google currently has a new report that is in beta and coming soon to Webmaster Tool accounts. This Micro Tutorial will highlight new features for Google Webmaster Tools.

803 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