Index: tableofcontents.pages.inc
===================================================================
--- tableofcontents.pages.inc	(revision 292192)
+++ tableofcontents.pages.inc	(working copy)
@@ -107,7 +107,7 @@
       $path = drupal_get_path('module', 'tableofcontents');
       $toc_translations = parse_ini_file($path . '/i18n-ascii.txt');
     }
-    $title = strtr($h->title, $toc_translations);
+    $title = strtr(strip_tags($h->title), $toc_translations);
 
     $id = preg_replace(
       array(
@@ -687,7 +687,7 @@
       $list_class = 'toc-level-' . ($level - $toc->minlevel + 1);
 
       // insert the li element
-      $output .= "\t<li class=\"$list_class\"><a href=\"#" . $h->identifier . "\">" . $number . $h->title . "</a>";
+      $output .= "\t<li class=\"$list_class\"><a href=\"#" . $h->identifier . "\">" . $number . strip_tags($h->title) . "</a>";
     }
   }
   // Did we recurse back out? If not, close open lists.
