I'm having an issue importing an ical feed from meetup.com into the calendar in drupal using feedapi, and parser_ical. If a line in an ical file is longer than 75 characters, it gets "folded" on to several lines. date_ical_parse unfolds these lines in date_api_ical.inc . However, when it unfolds the lines, it does not remove the spaces that were added when it was folded by meetup. As a result, I end up with extra spaces in my nodes .

From RFC 2445 section 4.1
For example the line:

DESCRIPTION:This is a long description that exists on a long line.

Can be represented as:

DESCRIPTION:This is a lo
 ng description
  that exists on a long line.

I got things to work by changing

     if (!preg_match('/([A-Z]+)[:;](.*)/', $line, $out)) {
      $line = array_pop($icaldata) . ($line);
    }

to

    if (preg_match('/^\s/', $line, $out)) {
      $line = array_pop($icaldata) . substr($line,1);
    }

Comments

kenwest’s picture

This is still an issue with 6.x-2.7.

SandraL’s picture

Still an issue with 7.x as well. Thanks for the fix, Jeff!

gerlos’s picture

In my experience, the problem was caused by carriage returns (\r) in ical file.

Solution described here: http://drupal.org/node/1559342#comment-6142676

damienmckenna’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

Unfortunately the Drupal 6 version of the Date module is no longer supported. That said, we appreciate that you took time to work on this issue. Should this request still be relevant for Drupal 7 please feel free to reopen it. Thank you.