includes/wikiengine/Render/Xhtml/Wikilink.php
changeset 21 663fcf528726
parent 1 fe660c52c48f
child 67 f6454d5fec7a
--- a/includes/wikiengine/Render/Xhtml/Wikilink.php	Sat Jun 23 19:27:41 2007 -0400
+++ b/includes/wikiengine/Render/Xhtml/Wikilink.php	Tue Jun 26 17:28:18 2007 -0400
@@ -57,8 +57,14 @@
     function token($options)
     {
         global $session;
-        if($session->sid_super) $as = htmlspecialchars(urlSeparator).'auth='.$session->sid_super;
-        else $as = '';
+        if ( $session->sid_super )
+        {
+          $as = htmlspecialchars(urlSeparator) . 'auth='.$session->sid_super;
+        }
+        else
+        {
+          $as = '';
+        }
         // make nice variable names (page, anchor, text)
         extract($options);
 
@@ -71,6 +77,8 @@
         } else {
         	$callback = false;
         }
+        
+        $page = sanitize_page_id( $page );
 
         if ($callback) {
             // use the callback function
@@ -92,7 +100,7 @@
         //$page = $this->urlEncode($page);
         $anchor = $this->urlEncode($anchor);
         $text = $this->textEncode($text);
-
+        
         // does the page exist?
         if ($exists) {