On Friday, February 11, 2011, 15:58:53, Sam Brown wrote: > That's accurate except in this case. The reason the & character shouldn't be > used in HTML is because it's a key element in the parsing of URLs (the & > character separates parameters in the URL). So in this case, where the & > character is actually in a URL, that is a perfectly appropriate usage of the > character as it is separating the key value pairs bar=y and m=baz.
No, & should always be escaped in HTML - URLs are no exception. The HTML parser sees foo&bar=baz and knows that the URL has to be foo&bar=baz. & on it's own is illegal in HTML, however since way too many people incorrectly assume that they can use & without escaping it, most browsers will treat & without ; following it as if & was written. You can see that here: <http://eternallybored.org/misc/thebat/test.html> - first URL uses & properly, second one doesn't. -- < Jernej Simončič ><><><><>< http://eternallybored.org/ > The two most common elements in the universe are hydrogen and stupidity. -- Kensington's Observation ________________________________________________ Current version is 4.2.42 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html