Subject: Should COMMAs be escaped in LOCATION?

From: Eric Busboom <[email-masked]>
Date: Sun, 14 May 2000 17:34:04 -0700 (PDT)

RFC 2445 has the following example text for LOCATION, which takes a TEXT
value: 

 LOCATION;ALTREP="http://xyzcorp.com/conf-rooms/f123.vcf":
      Conference Room - F123, Bldg. 002

In this example, as well as examples in RFC 2446, the commas are
unescaped. Is this correct? Section 4.3.11 specifies that commas in text
values must be escaped. 

eric.

---

From: [email-masked]
Date: Mon, 15 May 2000 12:55:27 -0400

Eric asked:
>unescaped. Is this correct? 

That depends on if LOCATION is allowed to be multivalued or not.  If it 
were, then it would be legit.  However according to 2445 it is not so the 
comma must be escapified.

>Section 4.3.11 specifies that commas in text
>values must be escaped. 

Only if they are NOT the delimiter of multiple values as in, say, CLASS. 
So the crux of the problem boils down to: Does the property support 
multiple values or not?  If not, you can "be forgiving" and treat it as an 
oversight or you can "be strict" and use just part of the parsed property 
value or toss it entirely.

Frank/RFC 244x Update Monitor: The examples need another pass to fix these 
mistakes since LOTS of programmers code to examples instead of to the 
text/BNF!!

Bruce
===========================================================================
Bruce Kahn                                INet: [email-masked]
Iris Associates                          Phone: 978.392.5335
Westford, MA, USA 01886                    FAX: and nothing but the FAX...
Standard disclaimers apply, even where prohibited by law...

---

From: [email-masked]
Date: Mon, 15 May 2000 13:02:23 -0400

One additional footnote to Erics question:

>Is this correct? 

If you are parsing vCalendar (remember that VERSION:1.0 spec??) then the 
values are "strings" (Shame on you vCalendar authors!!) and as such, if 
you are parsing a vCalendar LOCATION then the example is technically 
"correct" since the string is only terminated by the CRLF followed by a 
non-LWSP character.  Escapement of the comma is NOT required or of any 
meaning since the data was loosely typed (as opposed to the strong data 
typing of iCalendar).

So, for vCalendar the example IS correct.  For iCalendar, see previous 
reply.

  I mentioned vCalendar since there are some sites that currently use it 
(ie: Musi-cal) and I found at least a dozen projects that used (or still 
use) vCalendar as the data format so you should be somewhat sensitive to 
its presence.

Bruce