Preserved Topic: unknown entity (validation) when using a '&' in a URL (Page 1 of 1) |
|
---|---|
Paranoid (IV) Inmate From: 127.0.0.1 |
posted 08-06-2002 20:49
I have a line like this: |
Maniac (V) Mad Scientist From: 127 Halcyon Road, Marenia, Atlantis |
posted 08-06-2002 21:59
can you escape it with '\'? |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
posted 08-07-2002 11:12
I believe Mr. Max wrote "&" in his post a few times, forgetting that UBB changes that to "&". |
Maniac (V) Mad Scientist From: Belgrade, Serbia |
posted 08-07-2002 11:21
Ahhh, I made a mistake while editing my post that was above Slime's reply, and accidentally deleted it. Anyway, here's the text of my reply... |
Bipolar (III) Inmate From: USA! USA! USA! |
posted 08-07-2002 19:55
quote:
|
Paranoid (IV) Inmate From: 127.0.0.1 |
posted 08-07-2002 20:35
quote:
|
Maniac (V) Mad Scientist From: Belgrade, Serbia |
posted 08-07-2002 21:36
Hlaford, according to HTML specification, everything that starts with "&" sign should be treated as HTML entity (no matter where it's located). That's why using "&" alone in URLs is not valid. Most web browsers will recover from this fine (i.e. they won't treat text that follows "&" sign as HTML entity), but W3C HTML validator doesn't allow this. In most cases simply replacing all "&" signs with "&" will work fine, because web browsers will translate "&" back to "&" and pass it like that to web server, but as usual YMMV... |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
posted 08-07-2002 21:38
You are aware, of course, that the *browser* makes the change from & to &? It happens *before* the request is sent. You don't actually have to change the URL of what you're linking to. |
Paranoid (IV) Inmate From: 127.0.0.1 |
posted 08-07-2002 22:32 |
Maniac (V) Mad Scientist From: 127 Halcyon Road, Marenia, Atlantis |
posted 08-08-2002 14:47
yeah, damnit! get to work, slave! |