function date_ical_parse_text in Date 6
Same name and namespace in other branches
- 5.2 date_api_ical.inc \date_ical_parse_text()
- 5 date_api_ical.inc \date_ical_parse_text()
- 6.2 date_api_ical.inc \date_ical_parse_text()
- 7.3 date_api/date_api_ical.inc \date_ical_parse_text()
- 7 date_api/date_api_ical.inc \date_ical_parse_text()
- 7.2 date_api/date_api_ical.inc \date_ical_parse_text()
Parse and clean up ical text elements.
1 call to date_ical_parse_text()
- date_ical_parse in ./
date_api_ical.inc - Return an array of iCalendar information from an iCalendar file.
File
- ./
date_api_ical.inc, line 478 - Parse iCal data.
Code
function date_ical_parse_text($field, $data) {
if (strstr($field, 'QUOTED-PRINTABLE')) {
$data = quoted_printable_decode($data);
}
// Strip line breaks within element
$data = str_replace(array(
"\r\n ",
"\n ",
"\r ",
), '', $data);
// Put in line breaks where encoded
$data = str_replace(array(
"\\n",
"\\N",
), "\n", $data);
// Remove other escaping
$data = stripslashes($data);
return $data;
}