diff --git a/class.schedule.php b/class.schedule.php
--- a/class.schedule.php
+++ b/class.schedule.php
@@ -285,7 +285,7 @@ class Schedule
echo ' });
';
- echo '
You can share your schedule with the URL below:
'.$outputPage->gen_share_url($this->id_get()).'
';
+ echo 'You can share your schedule with the URL below:
' . htmlentities($outputPage->gen_share_url($this->id_get())) . '
';
echo 'Print :: Share :: Home
';
echo 'Having problems? Let us know.
';
echo 'Keyboard Shortcut: Left and right arrow keys switch between schedules
';
@@ -319,11 +319,11 @@ class Schedule
echo " \n";
@@ -521,6 +521,10 @@ class Schedule
* The ID of the schedule to link to. Defaults to the current schedule object.
* \param $page
* The page of the schedule to link to. Defaults to 0.
+ * \return
+ * A string, the URL used to access this schedule. Remember that
+ * if this string is inserted into an XHTML document,
+ * htmlentities() must be called on it.
*/
function url($id = NULL, $page = 0)
{
@@ -539,7 +543,7 @@ class Schedule
$url .= '&';
if ($page)
- $url .= 'page=' . (int)$page . '&';
+ $url .= 'page=' . (int)$page . '&';
return $url;
}