includes/render.php
changeset 159 f7e83b6db3be
parent 142 ca9118d9c0f2
child 163 ad00dc1f8706
--- a/includes/render.php	Mon Oct 01 22:18:51 2007 -0400
+++ b/includes/render.php	Mon Oct 01 23:48:24 2007 -0400
@@ -460,8 +460,8 @@
       list($page_id, $namespace) = RenderMan::strToPageID($matches[1][$i]);
       $pid_clean = $paths->nslist[$namespace] . sanitize_page_id($page_id);
       
-      $url = makeUrl($matches[1][$i], false, true);
-      $inner_text = htmlspecialchars(get_page_title($pid_clean));
+      $url = makeUrl($pid_clean, false, true);
+      $inner_text = ( isPage($pid_clean) ) ? htmlspecialchars(get_page_title($pid_clean)) : htmlspecialchars($matches[1][$i]);
       $quot = '"';
       $exists = ( isPage($pid_clean) ) ? '' : ' class="wikilink-nonexistent"';