Add line break in description field of yahoo calen

2019-08-30 09:21发布

问题:

I am trying to add a link to yahoo calendar events like this

https://calendar.yahoo.com/?v=60&DESC=Client%20Info%3A<br>Name%3A%20Hello%20World<br>&ST=20180630T070000&DUR=0100

But event description is appearing in same line. Other things are alright. Can anyone suggest how can I add line breaks in DESC so that it looks like this

Client Info
Name: Hello World

PS: Same description works fine in google calendar api.

回答1:

To break a line use %0d%0a (encoded CRLF or \r\n) or %0a (encoded LF or \n).

Example:

https://calendar.yahoo.com/?v=60&st=st20201231T193000&DUR=0200&desc=With%20clowns%0aand%20stuff&in_loc=North%20Pole

For more details you can check this document: https://github.com/InteractionDesignFoundation/add-event-to-calendar-docs/blob/master/services/yahoo.md