fixed calendar-title, & and " have been displayed as & or "

(cal is transmitting its data with entities and they get coded twice)
This commit is contained in:
Ralf Becker 2003-08-19 10:29:52 +00:00
parent 940e0c1df9
commit 006f912052

View File

@ -794,6 +794,17 @@
return False;
}
/*!
@function decode_htmlspecialchars
@syntax decode_htmlspecialchars( $str )
@author ralfbecker
@abstract reverse function of htmlspecialchars()
*/
function decode_htmlspecialchars($str)
{
return str_replace(array('&amp;','&quot;','&lt;','&gt;'),array('&','"','<','>'),$str);
}
/*!
@function calendar_title
@syntax calendar_title( $id )
@ -818,7 +829,7 @@
($GLOBALS['phpgw_info']['user']['preferences']['common']['timeformat'] == '12' ? 'h:i a' : 'H:i');
$name = $GLOBALS['phpgw']->common->show_date($this->bocal->maketime($event['start']) - $this->bocal->datetime->tz_offset,$format);
$name .= ': ' . $event['title'];
$name .= ': ' . $this->decode_htmlspecialchars($event['title']); // cal returns entities
return $name;
}