Fwd: Re: HTML encoding in URLs

This WebDNA talk-list message is from

1997


It keeps the original formatting.
numero = 14139
interpreted = N
texte = Ken Case from Omniweb has provided the explanation below, which makes sense, but doesn't make me feel any better. Just when I think I understand enough to do more than get by, along comes another weird one.Thanks for the prompt, professional and informative replies, Ken.Regards Thomas ---------------- Begin Forwarded Message ---------------- Date: 26/10 5:07 PM Received: 26/10 5:13 PM From: Ken Case, kc@omnigroup.com To: Thomas Wedderburn-Bisshop, thomas@woomeranet.com.au CC: WebCatalog Talk, WebDNA-Talk@smithmicro.comHi, just thought I'd provide a bit of clarification on that last message.> The problem is (as stated in OmniWeb's post below) that URLs should be > HTML-encoded, not ASCII. In other words, if something like &ne appears > ANYWHERE in a HTML page, including inside the get string of a URL, it > should be interpreted as ? (ie not equals).Assuming it's properly terminated, that is. Say, with a semi-colon (which is ignored), or with another non-name character (such as =) which wouldn't be ignored.Netscape, unfortunately, doesn't require proper termination, so it translates entities whether or not they're terminated properly (e.g., a<b becomes a In other words, the following URL > > search > > should be interpreted as > > search > > Omniweb does this, then sends the interpreted string when I click on the > link, which of course confuses WebCatalog no end.Actually, OmniWeb only does this when our Netscape-compatible nonterminated entities preference is enabled. If it were a=1&ne=2, then the standard would indicate that we should translate the &ne (since it's properly terminated by an equals sign), but with a=1&neb=2 it's not properly terminated. (On the other hand, it's a good idea to always quote your ampersands as & if you don't mean for them to be interpreted as entities, since new entities may be defined as HTML evolves. For example, &ne was introduced with the HTML math entities proposal a few years ago, and is now part of the current HTML 4.0 proposal.)> Netscape does NOT do this interpretation in this case, and sends the URL > exactly as originally received.Netscape does not interpret &ne in any context, because it does not yet support math entities. It will in fact do the interpretation for any entities which it actually recognizes (such as <). So it appears they are trying to conform to the standard (although they do improperly translate entities which are not properly terminated), but don't yet have support for all the HTML 4.0 entities which OmniWeb supports.> Should we avoid anything that has &ne in it (or &eq, or &pi or....)? Should > I always make the link look like: > > searchAwkward as that is, that would be my advice. (In an ideal world, the ampersand character wouldn't have been chosen both as the HTML entity marker and the separator for form values in URLs.) Ken----------------- End Forwarded Message -----------------Thomas Wedderburn-Bisshop Development Manager Woomera Net Solutions Associated Messages, from the most recent to the oldest:

    
Ken Case from Omniweb has provided the explanation below, which makes sense, but doesn't make me feel any better. Just when I think I understand enough to do more than get by, along comes another weird one.Thanks for the prompt, professional and informative replies, Ken.Regards Thomas ---------------- Begin Forwarded Message ---------------- Date: 26/10 5:07 PM Received: 26/10 5:13 PM From: Ken Case, kc@omnigroup.com To: Thomas Wedderburn-Bisshop, thomas@woomeranet.com.au CC: WebCatalog Talk, WebDNA-Talk@smithmicro.comHi, just thought I'd provide a bit of clarification on that last message.> The problem is (as stated in OmniWeb's post below) that URLs should be > HTML-encoded, not ASCII. In other words, if something like &ne appears > ANYWHERE in a HTML page, including inside the get string of a URL, it > should be interpreted as ? (ie not equals).Assuming it's properly terminated, that is. Say, with a semi-colon (which is ignored), or with another non-name character (such as =) which wouldn't be ignored.Netscape, unfortunately, doesn't require proper termination, so it translates entities whether or not they're terminated properly (e.g., a<b becomes a In other words, the following URL > > search > > should be interpreted as > > search > > Omniweb does this, then sends the interpreted string when I click on the > link, which of course confuses WebCatalog no end.Actually, OmniWeb only does this when our Netscape-compatible nonterminated entities preference is enabled. If it were a=1&ne=2, then the standard would indicate that we should translate the &ne (since it's properly terminated by an equals sign), but with a=1&neb=2 it's not properly terminated. (On the other hand, it's a good idea to always quote your ampersands as & if you don't mean for them to be interpreted as entities, since new entities may be defined as HTML evolves. For example, &ne was introduced with the HTML math entities proposal a few years ago, and is now part of the current HTML 4.0 proposal.)> Netscape does NOT do this interpretation in this case, and sends the URL > exactly as originally received.Netscape does not interpret &ne in any context, because it does not yet support math entities. It will in fact do the interpretation for any entities which it actually recognizes (such as <). So it appears they are trying to conform to the standard (although they do improperly translate entities which are not properly terminated), but don't yet have support for all the HTML 4.0 entities which OmniWeb supports.> Should we avoid anything that has &ne in it (or &eq, or &pi or....)? Should > I always make the link look like: > > searchAwkward as that is, that would be my advice. (In an ideal world, the ampersand character wouldn't have been chosen both as the HTML entity marker and the separator for form values in URLs.) Ken----------------- End Forwarded Message -----------------Thomas Wedderburn-Bisshop Development Manager Woomera Net Solutions Thomas Wedderburn-Bisshop

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Filemaker Pro & Webcatalog (1999) [WebDNA] PGP Encrypted Emails using [sendmail] (2009) showif and cart (1998) Encrypt (2000) Aaron kant add (or whatever it was) (2000) OFF-TOPIC: Check www.godaddy.com for me ... (2003) Weird WebCatalog problems (1998) Drop Down Menus (2002) Limits (2000) Showing unopened cart (1997) 2.0 Beta (1997) Forcing Paragraph Breaks on Results (1998) Kanji in http requests (1998) Multiple cart additions (1997) unable to launch acgi in WebCat (1997) Almost a there but..bye bye NetCloak (1997) can WC render sites out? (1997) Opinion: [input] should be called [output] ... (1997) user/password validation (1998) Just a thought (1998)