Skip to content

Instantly share code, notes, and snippets.

@franz-isx
Created April 30, 2012 12:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save franz-isx/2557707 to your computer and use it in GitHub Desktop.
Save franz-isx/2557707 to your computer and use it in GitHub Desktop.
Teamcal daynote patch
Index: /trunk/includes/tcdaynote.class.php
===================================================================
--- /trunk/includes/tcdaynote.class.php (revision 32)
+++ /trunk/includes/tcdaynote.class.php (revision 107)
Index: /trunk/includes/showmonth.function.php
===================================================================
--- /trunk/includes/showmonth.function.php (revision 78)
+++ /trunk/includes/showmonth.function.php (revision 107)
@@ -371,9 +371,9 @@
for ($i=1; $i<=$nofdays; $i=$i+1) {
//Get general Daynote into $title if one exists
if ($i<10) $dd="0".strval($i); else $dd=strval($i);
if ( $N->findByDay($year.$monthno.$dd,"all",$CONF['options']['region']) ) {
- $title=$N->daynote;
+ $title=htmlentities($N->daynote, ENT_QUOTES);
$style="-note";
} else {
$title="";
$style="";
@@ -832,9 +832,9 @@
* The personal daynote is appended to $title because it might
* contain a birthday text already. The style is overwritten.
* There can only be one marker.
*/
- $title .= addslashes($N->daynote);
+ $title .= htmlentities($N->daynote, ENT_QUOTES);
$style="-note";
}
}
Index: /trunk/showyear.php
===================================================================
--- /trunk/showyear.php (revision 78)
+++ /trunk/showyear.php (revision 107)
@@ -276,9 +276,9 @@
*/
$dd = sprintf("%02d",$n);
if ( $D->findByDay($showyear.$monthno.$dd,"all") ) {
$tt_settings=str_replace("Information",$LANG['showyear_tt_day'],$CONF['ovl_tt_settings']);
- $onmouseover=" onmouseover=\"return overlib('".$D->daynote."',".$tt_settings.");\"";
+ $onmouseover=" onmouseover=\"return overlib('".htmlentities($D->daynote, ENT_QUOTES)."',".$tt_settings.");\"";
$onmouseout=" onmouseout=\"return nd();\"";
$addstyle.=" background-image: url(themes/".$theme."/img/ovl_daynote.gif); background-repeat: no-repeat; background-position: top right;";
$title="";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment