ical-org / ical.net

ical.NET - an open source iCal library for .NET
MIT License
784 stars 231 forks source link

Regex failure #582

Closed NSV-dev closed 2 days ago

NSV-dev commented 1 year ago

Got exeption from parser in CalendarCollection.Load, i'd like regex mathcing to be a flag. This is correct event and i need to parse it, but got exeption

System.Runtime.Serialization.SerializationException: Could not parse line: 'ORGANIZER;CN=Sber500 & 2080 Acceleration Program:mailto:c_4eb66b106265305aa178a912be02479cb3c4a71159c9db935e8b515afff2f88f@group.calendar.google.com'
BEGIN:VEVENT
DTSTART;TZID=Europe/Moscow:20230919T172000
DTEND;TZID=Europe/Moscow:20230919T174000
SUMMARY:Team.me Offline rehearsal
UID:1qiki7damknn6qj7mc8ut0922p@google.com
SEQUENCE:0
DTSTAMP:20230929T111516Z
CREATED:20230914T230524Z
X-MICROSOFT-CDO-OWNERAPPTID:-1168347086
LOCATION:Kutuzovsky Ave\, 32\, Moskva\, Russia\, 121170
DESCRIPTION:<p>RUS</p><p>Приехать за 30 минут до начала своего слота!</p><p>Пасспорт + флешка с презентацией PDF</p><p>Форма одежды: свободная</p><p>Кутузовский проспект 32\, Г (После входа -&gt\; направо\, по экскалатору на 2 этаж. Снова направо\, в малый конференции зал)</p><br>ENG<br><br>Arrive 30 min before your slot!<br><br>Passport + USB with PDF presentation<br><br>Dress code: casual<br><br>Kutuzovski prospect 32. (After entrance -&gt\; turn right\, go up to the 2nd floor. Turn right again\, go to small conference hall)
URL:https://calendar.yandex.ru/event?event_id=1909162408
TRANSP:OPAQUE
CATEGORIES:Outlook
ORGANIZER;CN=Sber500 & 2080 Acceleration Program:mailto:c_4eb66b106265305aa178a912be02479cb3c4a71159c9db935e8b515afff2f88f@group.calendar.google.com
ATTENDEE;PARTSTAT=NEEDS-ACTION;CN={email};ROLE=REQ-PARTICIPANT:mailto:{email}
ATTENDEE;PARTSTAT=NEEDS-ACTION;CN={email};ROLE=REQ-PARTICIPANT:mailto:{email}
ATTENDEE;PARTSTAT=ACCEPTED;CN=Sber500 & 2080 Acceleration Program;ROLE=REQ-PARTICIPANT:mailto:c_4eb66b106265305aa178a912be02479cb3c4a71159c9db935e8b515afff2f88f@group.calendar.google.com
LAST-MODIFIED:20230914T230524Z
CLASS:PUBLIC
END:VEVENT

emails was fine, just deleted them for privacy reasons

Trace

at Ical.Net.Serialization.SimpleDeserializer.ParseContentLine(SerializationContext context, String input)
at Ical.Net.Serialization.SimpleDeserializer.Deserialize(TextReader reader)+MoveNext()
at System.Linq.Enumerable.OfTypeIterator[TResult](IEnumerable source)+MoveNext()
at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
at Ical.Net.CalendarCollection.Load(TextReader tr)
at Ical.Net.CalendarCollection.Load(String iCalendarString)
axunonb commented 2 days ago

Please double-check the new version merged with #595