{"action":"created","issue":{"url":"https://api.github.com/repos/collective/icalendar/issues/84","repository_url":"https://api.github.com/repos/collective/icalendar","labels_url":"https://api.github.com/repos/collective/icalendar/issues/84/labels{/name}","comments_url":"https://api.github.com/repos/collective/icalendar/issues/84/comments","events_url":"https://api.github.com/repos/collective/icalendar/issues/84/events","html_url":"https://github.com/collective/icalendar/issues/84","id":10545844,"number":84,"title":"failing to parse a VEVENT with embedded HTML","user":{"login":"rbpasker","id":87866,"avatar_url":"https://avatars.githubusercontent.com/u/87866?v=3","gravatar_id":"","url":"https://api.github.com/users/rbpasker","html_url":"https://github.com/rbpasker","followers_url":"https://api.github.com/users/rbpasker/followers","following_url":"https://api.github.com/users/rbpasker/following{/other_user}","gists_url":"https://api.github.com/users/rbpasker/gists{/gist_id}","starred_url":"https://api.github.com/users/rbpasker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rbpasker/subscriptions","organizations_url":"https://api.github.com/users/rbpasker/orgs","repos_url":"https://api.github.com/users/rbpasker/repos","events_url":"https://api.github.com/users/rbpasker/events{/privacy}","received_events_url":"https://api.github.com/users/rbpasker/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2013-02-01T16:25:56Z","updated_at":"2016-02-12T21:54:18Z","closed_at":null,"body":"here's a small program copied from the docs:\r\n\r\n```python\r\nfrom icalendar import Calendar, Event\r\nfrom datetime import datetime\r\nimport pprint\r\n\r\ncalfile = '/Users/rbp/Downloads/calendar.ical'\r\ncal = Calendar.from_ical(open(calfile,'rb').read())\r\nfor component in cal.walk():\r\n    pprint.pprint(component)\r\n```\r\n\r\nit breaks on a VEVENT that has embedded HTML. this violates RFC 2445 4.1, for sure.  but it seems that Calendar on both OS/X 10.8 and IOS 6 both accept it.\r\n\r\n```\r\n Traceback (most recent call last):\r\n  File \"tengah/workers/ical/icalworker.py\", line 7, in <module>\r\n    cal = Calendar.from_ical(open(calfile,'rb').read())\r\n  File \"/Users/rbp/Projects/tengahdb/lib/python2.7/site-packages/icalendar/cal.py\", line 412, in from_ical\r\n   name, params, vals = line.parts()\r\n  File \"/Users/rbp/Projects/tengahdb/lib/python2.7/site-packages/icalendar/parser.py\", line 526, in parts\r\n    raise ValueError, \"Content line could not be parsed into parts: %r: %s\" % (self, e)\r\nValueError: Content line could not be parsed into parts: '<P DIR=LTR><SPAN LANG=\"en-us\"></SPAN><SPAN LANG=\"en-us\"><FONT FACE=\"Calibri\">Silicon Valley Venture CONNECT:NYC</FONT></SPAN></P>': <P DIR=LTR><SPAN LANG=\"en-us\"></SPAN><SPAN LANG=\"en-us\"><FONT FACE=\"Calibri\">Silicon Valley Venture CONNECT\r\n```\r\n\r\nhere is the event which has the embedded HTML. Looks like there are no spaces in col 1 before the markup\r\n\r\n```\r\nBEGIN:VEVENT\r\nSUMMARY:Silicon Valley Venture CONNECT: NYC\r\nPRIORITY:5\r\nCLASS:PUBLIC\r\n<P DIR=LTR><SPAN LANG=\"en-us\"></SPAN><SPAN LANG=\"en-us\"><FONT \r\n FACE=\"Calibri\">Silicon Valley Venture CONNECT:NYC</FONT></SPAN></P>\r\n<P DIR=LTR><SPAN LANG=\"en-us\"></SPAN><SPAN LANG=\"en-us\"><FONT \r\n FACE=\"Calibri\"></FONT></SPAN><SPAN LANG=\"en-us\"></SPAN><SPAN \r\n LANG=\"en-us\"></SPAN><SPAN LANG=\"en-us\">&nbsp:</SPAN></P>\r\nUID:\r\n 040000008200E00074C5B7101A82E0080000000080014D63E6EFCD01000000000000000010\r\n 000000A9040CD0D461274B96FFE0377A232232\r\nDTSTART;TZID=US/Pacific:20130130T150000\r\nSEQUENCE:0\r\nLOCATION:Four Seasons New York (57 East 57th Street)\r\nDTSTAMP:20130116T192905Z\r\nLAST-MODIFIED:20130116T192905Z\r\nCREATED:20130116T192905Z\r\nDTEND;TZID=US/Pacific:20130130T180000\r\nDESCRIPTION:Silicon Valley Venture CONNECT: NYC\\n\\nWednesday\\, January \r\n 30th\\n6 - 9 pm ET\\n\\nFour Seasons New York\\n57 East 57th Street\\nNew \r\n York\\, NY 10022\\n \\n\\n\r\nATTACH;MANAGED-ID=11e1b05faa;FILENAME=Attachment;\r\n FMTTYPE=application/octet-stream;SIZE=500209:https:\r\n //p02-caldav.icloud.com/39941937/attach/2_AFL2YNSD5UD434M3PYAMB3VF6DRYQQQZ\r\n HDU5UK2FLV7Z72QGJOOF45PMXFGO67IAKJIWMKEYJTD7GECXJQ4RQHGUPW2I6ZNFJ4JWF47UI6\r\n GCQPQUCIN6QUOCX3ZICVVNWPPZX37ARN2LTCIVUSNNP5VBMYZTBYCKZNAMO42HKCF2JLV5ZAU2\r\n QMUCGLCJXWZ6XOGVEDMFUUFTI7TWTOTMJ5TKWEXPR7TOTKVWLGI/Attachment\r\nX-ALT-DESC;FMTTYPE=text/html:<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML \r\n 3.2//EN\">\r\nX-LIC-ERROR;X-LIC-ERRORTYPE=COMPONENT-PARSE-ERROR:Got a data line\\, but \r\n could not find a property name or component begin tag: <HTML>\r\nX-LIC-ERROR;X-LIC-ERRORTYPE=COMPONENT-PARSE-ERROR:Got a data line\\, but \r\n could not find a property name or component begin tag: <HEAD>\r\nX-LIC-ERROR;X-LIC-ERRORTYPE=COMPONENT-PARSE-ERROR:Got a data line\\, but \r\n could not find a property name or component begin tag: <META \r\n NAME=\\\"Generator\\\" CONTENT=\\\"MS Exchange Server version \r\n 14.02.5004.000\\\">\r\nX-LIC-ERROR;X-LIC-ERRORTYPE=COMPONENT-PARSE-ERROR:Got a data line\\, but \r\n could not find a property name or component begin tag: <TITLE></TITLE>\r\nX-LIC-ERROR;X-LIC-ERRORTYPE=COMPONENT-PARSE-ERROR:Got a data line\\, but \r\n could not find a property name or component begin tag: </HEAD>\r\nX-LIC-ERROR;X-LIC-ERRORTYPE=COMPONENT-PARSE-ERROR:Got a data line\\, but \r\n could not find a property name or component begin tag: <BODY>\r\nX-LIC-ERROR;X-LIC-ERRORTYPE=COMPONENT-PARSE-ERROR:Got a data line\\, but \r\n could not find a property name or component begin tag: <!-- Converted \r\n from text/rtf format -->\r\nX-LIC-ERROR;X-LIC-ERRORTYPE=COMPONENT-PARSE-ERROR:Got a data line\\, but \r\n could not find a property name or component begin tag: <P DIR=LTR><SPAN \r\n LANG=\\\"en-us\\\"><FONT FACE=\\\"Calibri\\\">Wednesday\\, January \r\n 30th</FONT></SPAN></P>\r\nX-LIC-ERROR;X-LIC-ERRORTYPE=COMPONENT-PARSE-ERROR:Got a data line\\, but \r\n could not find a property name or component begin tag: <P DIR=LTR><SPAN \r\n LANG=\\\"en-us\\\"><FONT FACE=\\\"Calibri\\\">6 - 9 pm ET</FONT></SPAN></P>\r\nX-LIC-ERROR;X-LIC-ERRORTYPE=COMPONENT-PARSE-ERROR:Got a data line\\, but \r\n could not find a property name or component begin tag: <P DIR=LTR><SPAN \r\n LANG=\\\"en-us\\\"><FONT FACE=\\\"Calibri\\\">Four Seasons New \r\n York</FONT></SPAN></P>\r\nX-LIC-ERROR;X-LIC-ERRORTYPE=COMPONENT-PARSE-ERROR:Got a data line\\, but \r\n could not find a property name or component begin tag: <P DIR=LTR><SPAN \r\n LANG=\\\"en-us\\\"><FONT FACE=\\\"Calibri\\\">57 East 57th \r\n Street</FONT></SPAN></P>\r\nX-LIC-ERROR;X-LIC-ERRORTYPE=COMPONENT-PARSE-ERROR:Got a data line\\, but \r\n could not find a property name or component begin tag: <P DIR=LTR><SPAN \r\n LANG=\\\"en-us\\\"><FONT FACE=\\\"Calibri\\\">New York\\, NY \r\n 10022</FONT></SPAN></P>\r\nX-LIC-ERROR;X-LIC-ERRORTYPE=COMPONENT-PARSE-ERROR:Got a data line\\, but \r\n could not find a property name or component begin tag: <P DIR=LTR><SPAN \r\n LANG=\\\"en-us\\\"></SPAN><SPAN LANG=\\\"en-us\\\"></SPAN></P>\r\nX-LIC-ERROR;X-LIC-ERRORTYPE=COMPONENT-PARSE-ERROR:Got a data line\\, but \r\n could not find a property name or component begin tag: </BODY>\r\nX-LIC-ERROR;X-LIC-ERRORTYPE=COMPONENT-PARSE-ERROR:Got a data line\\, but \r\n could not find a property name or component begin tag: </HTML>\r\nX-MS-OLK-AUTOFILLLOCATION:FALSE\r\nX-MS-OLK-CONFTYPE:0\r\nX-MICROSOFT-CDO-IMPORTANCE:1\r\nX-MICROSOFT-CDO-BUSYSTATUS:BUSY\r\nTRANSP:OPAQUE\r\nX-MICROSOFT-DISALLOW-COUNTER:FALSE\r\n```"},"comment":{"url":"https://api.github.com/repos/collective/icalendar/issues/comments/183502368","html_url":"https://github.com/collective/icalendar/issues/84#issuecomment-183502368","issue_url":"https://api.github.com/repos/collective/icalendar/issues/84","id":183502368,"user":{"login":"untitaker","id":837573,"avatar_url":"https://avatars.githubusercontent.com/u/837573?v=3","gravatar_id":"","url":"https://api.github.com/users/untitaker","html_url":"https://github.com/untitaker","followers_url":"https://api.github.com/users/untitaker/followers","following_url":"https://api.github.com/users/untitaker/following{/other_user}","gists_url":"https://api.github.com/users/untitaker/gists{/gist_id}","starred_url":"https://api.github.com/users/untitaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/untitaker/subscriptions","organizations_url":"https://api.github.com/users/untitaker/orgs","repos_url":"https://api.github.com/users/untitaker/repos","events_url":"https://api.github.com/users/untitaker/events{/privacy}","received_events_url":"https://api.github.com/users/untitaker/received_events","type":"User","site_admin":false},"created_at":"2016-02-12T21:54:18Z","updated_at":"2016-02-12T21:54:18Z","body":"Because the ics file is completely invalid."}}