- From: Frank Ellermann <nobody@xyzzy.claranet.de>
- Date: Sun, 10 Jul 2005 17:13:04 +0200
- To: uri@w3.org
Etan Wexler wrote: > The form <quoted-string> is neither listed as obsolete nor is > obsolete in practice. A quoted-pair for NO-WS-TL in a quoted-string is utter dubious, the worst practical case is the quoted-pair "\" SP. [percent-ecoding] > The ambiguity is zero. Yes, but you've to be very sure that nobody encodes or decodes the tags more than once. > tag-atext = ALPHA / DIGIT / > "!" / "%23" / > "$" / "%25" / > "&" / "%27" / > "*" / "+" / > "-" / "%2F" / > "=" / "%3F" / > "%5E" / "_" / > "%60" / "%7B" / > "%7C" / "%7D" / > "~" That's IMHO very elegant... > tag-no-fold-quote = "'" *tag-qtext "'" ...here it starts to get tricky, you'e replaced DQUOTE by "'" avoiding the "%22" for a percent-encoded-DQUOTE, and then you replace all quoted-pairs (backslash + whatever) by the escaped character: > tag-qtext = "%01" / "%02" / "%03" / "%04" / [...] > "%1D" / "%1E" / "%1F" / "%20" / NO-WS-CTL is utter dubious, no matter what the standards say, without "security considerations" I'd stay away from this crap. > "!" / "%22" / "%23" / "$" / > "%25" / "&" / "%27" / "(" / Maybe it's also elegant, but it's not obvious, you take the "semantical content" of a quoted string as defined in 2822, in other words, remove all backslashes from \x, and then you use "'" instead of DQUOTE, and finally you percent-encode it, e.g. 1: "\\\"it's\ ugly\\\""@example input address 2: "\"it's ugly \""@example semantical content 3: '%5C%22it%27s%20ugly%5C%22'@example percent-encoded Works, but it's no straight forward scheme. The alternative... %22%5C%5C%5C%22it's%22%20ugly%5C%5C%5C%22%22@example ...is much longer and a pain, but needs no special explanation. > colon already has a reserved meaning within ?tag? URIs, Yes, anything that's reserved must be encoded, ":" => "%3A". > If the number sign were to appear literally, it would start > a fragment identifier where none belongs. The scheme has fragments, so ""#" => "%23" is clear. It does not define a path or query, I'm not sure about "/", "?", "=" - do you propose to reserve it because it would be too confusing, or is this actually necessary ? [...] > ALPHA / "%5B" / "%5C" / "%5D" / Be careful with ALPHA, local parts are case sensitive. Bye.
Received on Sunday, 10 July 2005 15:15:26 UTC