Created
April 30, 2012 12:08
-
-
Save franz-isx/2557707 to your computer and use it in GitHub Desktop.
Teamcal daynote patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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