kewisch/ical.js

https://mozilla-comm.github.io/ical.js/validator.html broken

miiichael opened this issue · 2 comments

Tried to paste in a simple ical (that passes the (rather permissive) validator at https://icalendar.org/validator.html), only to be greeted with:

Couldn't parse as iCalendar:
Error: ReferenceError: ICAL is not defined
Stack: ReferenceError: ICAL is not defined
    at validate (https://mozilla-comm.github.io/ical.js/validator.html:49:17)
    at HTMLFormElement.onsubmit (https://mozilla-comm.github.io/ical.js/validator.html:85:72)

Nor as jCal:
Error: SyntaxError: Unexpected token B in JSON at position 0
Stack: SyntaxError: Unexpected token B in JSON at position 0
    at JSON.parse (<anonymous>)
    at validate (https://mozilla-comm.github.io/ical.js/validator.html:45:25)
    at HTMLFormElement.onsubmit (https://mozilla-comm.github.io/ical.js/validator.html:85:72)

I found a problem which i described here :

#488

and I suspect that yours come from this, since you get an undeclared ICAL.

you can fix it yourself with a bit of "hack", though it's very inconvenient.

For some reason it worked for me before, but the validator uses 1.5.0 now which includes a fix for #470. Thanks for reporting!