chrra / iCalendar

iCalendar data types, parser, and printer.
BSD 3-Clause "New" or "Revised" License
38 stars 47 forks source link

URL parsing is too strict #42

Closed NorfairKing closed 1 month ago

NorfairKing commented 3 years ago

(line 225, column 1): Invalid URI: "www.ccs.ag"

Perhaps it is best to just leave the URI as a Text instead of a URI?

oscar-h64 commented 3 years ago

I've come here after finding a similar issue, however this library is supposed to be RFC5545 compliant, and that requires URLs to be properly formatted with a scheme (source), so really this is a bug with whatever is generating the ICS. Maybe a better solution would be to make this a warning and set the URL to be Nothing instead of failing completely?

NorfairKing commented 3 years ago

Apple cloud is what generated the error, so I don't think I can fix things there. I like @oscar-h64 's proposed solution :)

oscar-h64 commented 3 years ago

Ah yes, not much you can do there. I'm happy to make a PR for this, or I know you have one open if you'd rather do it and update that?

NorfairKing commented 3 years ago

Go for it! No hurries though, I'm not blocked on this.

NorfairKing commented 1 month ago

I ended up making https://github.com/NorfairKing/ical in the end, which fixes this problem.

schoettl commented 1 month ago

Oh, I didn't found that because it's not a direct fork and has a different name. Nice, do you plan to publish it on hackage? Or are there plans to use your's as a successor under the same name iCalendar on hackage?

NorfairKing commented 1 month ago

@schoettl I have no plans for either. It took me a few months to make and now I use it in my products, like https://github.com/NorfairKing/smos.