Menu

Lengthy DESCRIPTION?

Help
Cymen Vig
2006-06-30
2013-03-23
  • Cymen Vig

    Cymen Vig - 2006-06-30

    What is the proper way of having a long description in an VEVENT? Should the text have new lines or do new lines need to be translated to something else before being inserted into the ical format?

     
    • Cymen Vig

      Cymen Vig - 2006-06-30

      Now it makes sense -- when the data is put into the iCal format everything for DESCRIPTION should have indented by one character if it is longer than a line. Unfortunately, the library doesn't correctly handle the case in which the text has embedded newlines. Right now, it does this:

      DESCRIPTION:ID - 2922^M
      Status - Approved^M
      Customer - Nachos Supreme Infr^M
      astructu^M
      Creator - Ed Madness^M
      Type - Implementation^M
      Impact - Internal IT ^M

      By spec, it should do this:

      DESCRIPTION:ID - 2922^M
      Status - Approved^M
      Customer - Nachos Supreme Infr^M
      astructu^M
      Creator - Ed Madness^M
      Type - Implementation^M
      Impact - Internal IT ^M

      This seems easy enough to fix but I need to read the library code more closely to figure out where it should go.

       
      • Cymen Vig

        Cymen Vig - 2006-06-30

        The spaces were removed by the forum software. The data should have come out like this:

        DESCRIPTION:ID - 2922^M
        . Status - Approved^M
        . Customer - Nachos Supreme Infr^M
        astructu^M
        . Creator - Ed Madness^M
        . Type - Implementation^M
        . Impact - Internal IT ^M

        Except replace the "." with nothing.

         
        • Cymen Vig

          Cymen Vig - 2006-06-30

          The answer to this was that the library is right -- I was wrong. If you want to embed a bunch of text into an appointment then replace the new lines with literal \n. So in PHP, something like str_replace("\r\n", '\n', $text) would do it.

           

Log in to post a comment.