includes/wikiengine/render_xhtml.php
changeset 1127 4b858862c35c
parent 1106 01315acbc22b
child 1156 417e66a664d0
--- a/includes/wikiengine/render_xhtml.php	Wed Sep 30 20:01:23 2009 -0400
+++ b/includes/wikiengine/render_xhtml.php	Sun Oct 04 03:59:38 2009 -0400
@@ -29,6 +29,8 @@
     foreach ( $pieces as $i => $piece )
     {
       $tocid = sanitize_page_id(trim($piece['text']));
+      // (bad) workaround for links in headings
+      $tocid = str_replace(array('[', ']'), '', $tocid);
       $tag = '<h' . $piece['level'] . ' id="head:' . $tocid . '">';
       $tag .= trim($piece['text']);
       $tag .= '</h' . $piece['level'] . '>';