在Yahoo Calendar API的描述字段中添加换行符 [英] Add line break in description field of yahoo calendar api

查看:119
本文介绍了在Yahoo Calendar API的描述字段中添加换行符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试向此类yahoo日历事件添加链接

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

但是事件描述出现在同一行中。其他事情都还好。谁能建议我如何在 DESC 中添加换行符,使它看起来像这样

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:相同的描述适用于google calendar API。

PS: Same description works fine in google calendar api.

推荐答案

要中断行,请使用%0d%0a (编码为CRLF或 \r\n )或%0a (编码为LF或 \n )。

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

示例:

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

有关更多详细信息,请查看以下文档: https://github.com/InteractionDesignFoundation/add-event-to-calendar-docs/blob/master/services/yahoo。 md

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

这篇关于在Yahoo Calendar API的描述字段中添加换行符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆