emersion / go-vcard

A Go library to parse and format vCard
MIT License
107 stars 34 forks source link

adds support for properties with multiple values #34

Closed oliverpool closed 1 month ago

oliverpool commented 1 month ago

Continuing the work started by @GorthMohogany in #11 to address #5

When decoding, it splits the value if it contains unescaped ,

From the original PR I dropped the space removal (strings.TrimSpace(value)) since I couldn't find anything in the RFC supporting this operation.

Note that it raises further questions for fields containing unescaped commas, like in https://datatracker.ietf.org/doc/html/rfc6350#section-8 (however those can be addressed in a later PR)

GEO;TYPE=work:geo:46.772673,-71.282945
oliverpool commented 1 month ago

Actually, I am wondering if we shouldn't let the comma as-is (i.e. no escaping / no unescaping): the application should interpret them how they like (and this lib should make it easy to escape them)

oliverpool commented 1 month ago

Superseded by #35