Hmm... I need to find out myself. I don't know what is the right answer. I'll do some poking around and get back to you if I find an answer. You should email the people at iPage as they probably could give you help..
No, here's the write up at.
Ampersands (&'s) in URLs.
Another common error occurs when including a URL which contains an ampersand ("&"):.
<! This is invalid! > <a href="foo.cgi?chapter=1§ion=2">...</a>.
This example generates an error for "unknown entity section" because the "&" is assumed to begin an entity. In many cases, browsers will recover safely from the error, but the example used here will cause the link to fail in Netscape 3.x (but not other versions of Netscape) since it will assume that the author intended to write §ion, which is equivalent to ion..
To avoid problems with both validators and browsers, always use & in place of &:.
According to W3C the way OSC handles this is invalid. The explanation they give is pretty clear. The sesion ID looks like this in an OSC URL when the visitor has cookies off:.
It should be:.
Well, if you wanted to do this, you would replace this line in function tep_href_link (in includes/functions/html_output.php):.
I see the "bad" usage just about everywhere, though...
There is a contribution for this.
I believe it only adds:.
$link = str_replace('&', '&', $link);.
To the tep_href_link function in /includes/functions, but it works fine...
Okay, there is another answer to this, but I just can't remember what it is! You can use just the '&' in the pathway, if you define it in one of the files as '&'. Then all references to '&' in file pathways are treated as being '&' and don't generate w3c.org errors. Sorry I can't be more helpful, other than to say that this is possible..
The contribution works great and is easy to apply. I suppose ideally the URL's should be created with correct encoding rather than being patched up at the end, but that's beyond my skill for sure..
Thanks for the help...
OK in my quest to make my installation of OSC 100% HTML 4.01 compliant I've encountered a glitch that stumps me. According to W3C a URL isn't supposed to contain an ampersand. It's supposed to be done as & (Ampersand, alpha, micahel, paul, semicolon... in case that doesn't come through)..
If a visitor has cookies disabled the session info is coded into all the links on every page. Most of this links are built with an unescaped ampersand. How would one go about changing ALL those links to the proper code. I really hope there is a single function somewhere that generates all those links. I was digging around in session.php it looks like it should be in there someplace, I just can't find it..
Could somebody steer me towards the right place to make this (hopefully) minor change..
This post has been edited by.
: 26 September 2004, 00:18..
I think you are misreading things. HTML source is not supposed to contain an unescaped ampersand - it is represented as & in the source. In URLs, & is used as an item separator in dynamic queries and that is perfectly fine. There is nothing to change...