Truncate details to avoid 414 error on Google Calendar site

A long description yields this error on the Google Calendar site:

414 That’s an error.

The requested URL /calendar/b/0/render... is too large to process. That’s all we know.

This is how I worked around it, although it would probably be better to check the length of the entire url.