jayrav13 / ical_dict

A Python library to convert an .ics file into a Dictionary object.
MIT License
5 stars 1 forks source link

Split by first instance ONLY - not every instance #6

Closed jayrav13 closed 8 years ago

jayrav13 commented 8 years ago

For each line item in an .ics file, only split by the first occurrence of a semicolon (:). Splitting by every occurrence can impact text values that have a semicolon in it.

Ex:

This text:

DESCRIPTION:Lab safety training takes approximately 2 hours to complete 
 and is intended for new and returning students\, faculty and staff who\n
 will be working (or taking classes) in NJIT labs and have not previously
  attended lab safety training. Note: employee or student\nresearchers wh
 o are handling chemicals must also attend annual Hazard Communication (H
 azCom) training which is covered during\nthe first hour of Lab Safety Tr
 aining.

was reduced to this JSON:

"description": "Lab safety training takes approximately 2 hours to complete and is intended for new and returning students\\, faculty and staff who\\n will be working (or taking classes) in NJIT labs and have not previously  attended lab safety training. Note"
jayrav13 commented 8 years ago

This issue is resolved in Pull Request #9 .