Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The changes in this commit introduce a bug in the date_ical_parse_text() function.
The str_replace() calls there should no longer be looking for line-breaks followed by spaces, since the spaces are now filtered when the line "unfolding" happens.
This seems to be needed for the 7.x branch as well.
Comment | File | Size | Author |
---|---|---|---|
date_ical_parse_text.patch | 540 bytes | ttrafford | |
Comments
Comment #2
ttrafford CreditAttribution: ttrafford commentedComment #3
ttrafford CreditAttribution: ttrafford commenteddate_ical_parse_text.patch queued for re-testing.
Comment #4
Letharion CreditAttribution: Letharion commentedSetting a meningful title.
Comment #5
ttrafford CreditAttribution: ttrafford commentedFrom the commit referenced in the main bug report:
- $line = array_pop($icaldata) . ($line);
+ // Trim up to 1 leading space from wrapped line per iCalendar standard.
+ $line = array_pop($icaldata) . (ltrim(substr($line, 0, 1)) . substr($line, 1));
I should have written that this change is needed because the extra space is now removed at the time of unfolding, and so the replace fails when trying to do this:
$data = str_replace(array("\r\n ", "\n ", "\r "), '', $data);
The patch removes the spaces from the ends of the match strings.
Comment #6
DamienMcKennaBumped to the D7 branch.