Subject: [calsify] Escaping dquote in a parameter value

From: Cyrus Daboo <[email-masked]>
Date: Tue, 19 Jun 2012 22:56:34 -0400

Hi,
As I am sure most people are aware, a double-quote character is forbidden 
to appear in a parameter value in both vCard and iCalendar. Yet there is a 
need to preserve double-quotes in a parameter value. So I am going to 
propose an extension to the specifications whereby a new escape mechanism 
is introduced solely for the purpose of allowing d-quote in a parameter 
value in a backwards compatible manner.

My proposal is to use ^ (0x5e) as an escape character, with only the 
following two sequences allowed:

^^ - represents a single ^ character
^' - represents a single d-quote character

I ruled out use of \ because some parsers erroneously eat that, and it 
would also be tempting to use \" which is definitely not possible because 
the dquote cannot appear.

I also ruled out & (XML/HTML entity style) and % (URI style) style escaping 
as being too general - we don't need to escape arbitrary characters - only 
dquote. Also, I think & and % are already in common use in parameter values 
that have URIs, so would end up being escaped themselves a lot more. I 
suspect ^ is one of the least used characters and so the need to escape the 
escape character is less.

Obviously there would need to be some backwards compatibility statement in 
regard to what to do with existing values with a single ^. I would suggest 
any combination that is not one of the above two, should be left alone when 
parsing. But when generating, it would be escaped as ^^.

There are probably some other ascii symbols that are infrequently used too, 
that we could pick if there are strong arguments against ^, but for now I 
am happy with ^.

Thoughts?

-- 
Cyrus Daboo

_______________________________________________
calsify mailing list
[email-masked]
https://www.ietf.org/mailman/listinfo/calsify