From 006f9120529587e39201280ded6d6cc0b6cdf146 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 19 Aug 2003 10:29:52 +0000 Subject: [PATCH] fixed calendar-title, & and " have been displayed as & or " (cal is transmitting its data with entities and they get coded twice) --- infolog/inc/class.bolink.inc.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/infolog/inc/class.bolink.inc.php b/infolog/inc/class.bolink.inc.php index dc353766ce..954329098d 100644 --- a/infolog/inc/class.bolink.inc.php +++ b/infolog/inc/class.bolink.inc.php @@ -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('&','"','<','>'),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; }