includes/render.php
changeset 159 f7e83b6db3be
parent 142 ca9118d9c0f2
child 163 ad00dc1f8706
equal deleted inserted replaced
158:ebf00a7d21db 159:f7e83b6db3be
   458     foreach ( $matches[0] as $i => $match )
   458     foreach ( $matches[0] as $i => $match )
   459     {
   459     {
   460       list($page_id, $namespace) = RenderMan::strToPageID($matches[1][$i]);
   460       list($page_id, $namespace) = RenderMan::strToPageID($matches[1][$i]);
   461       $pid_clean = $paths->nslist[$namespace] . sanitize_page_id($page_id);
   461       $pid_clean = $paths->nslist[$namespace] . sanitize_page_id($page_id);
   462       
   462       
   463       $url = makeUrl($matches[1][$i], false, true);
   463       $url = makeUrl($pid_clean, false, true);
   464       $inner_text = htmlspecialchars(get_page_title($pid_clean));
   464       $inner_text = ( isPage($pid_clean) ) ? htmlspecialchars(get_page_title($pid_clean)) : htmlspecialchars($matches[1][$i]);
   465       $quot = '"';
   465       $quot = '"';
   466       $exists = ( isPage($pid_clean) ) ? '' : ' class="wikilink-nonexistent"';
   466       $exists = ( isPage($pid_clean) ) ? '' : ' class="wikilink-nonexistent"';
   467       
   467       
   468       $link = "<a href={$quot}{$url}{$quot}{$exists}>{$inner_text}</a>";
   468       $link = "<a href={$quot}{$url}{$quot}{$exists}>{$inner_text}</a>";
   469       
   469