dongnuo3749 2017-03-28 16:00
浏览 69

在icalendar值中使用文字'dquote'字符串

I'm looking at an open-source PHP program which performs the following transformation to replace double-quote characters in string values:

$text = str_replace("\"", "DQUOTE", $text);

For example, the string Call me "foo"., after this transformation, would be represented in an icalendar DESCRIPTION field like so:

DESCRIPTION:Call me DQUOTEfooDQUOTE.

My reading of various online documentation (http://www.ietf.org/rfc/rfc2445.txt and its summaries at http://www.kanzaki.com/docs/ical/) indicate that this is incorrect, and the correct representation should be

DESCRIPTION:Call me \"foo\".

What is the correct representation?

  • 写回答

1条回答 默认 最新

  • doutui839638 2017-03-29 04:45
    关注

    The spec at https://tools.ietf.org/html/rfc2445#section-4.3.11 indicates that double and single quotes need not be escaped at all, as does the example for the DESCRIPTION field (https://tools.ietf.org/html/rfc2445#section-4.8.1.5), so the correct representation would be

    DESCRIPTION:Call me "foo".

    BTW, in the time since this question was asked, the affected open-source project has fixed this issue: https://issues.civicrm.org/jira/browse/CRM-20350

    评论

报告相同问题?

悬赏问题

  • ¥15 基于卷积神经网络的声纹识别
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 stm32开发clion时遇到的编译问题