--- headinganchors.module	2008-12-31 17:08:36.000000000 -0500
+++ headinganchors (copie).module	2009-03-16 14:47:28.000000000 -0400
@@ -93,7 +93,14 @@ function headinganchors_filter($op, $del
         else {
           // sanitize ID text & remove leading digits (invalid on IDs)
           $anchor = preg_replace("/&amp;/", "", strip_tags($matches[3][$count]));
-          $anchor = preg_replace("/[^A-Za-z0-9]/", "", $anchor);
+
+          // sanitize accents (e.g. é=>e)
+          // thanks to pathauto module for i18n-ascii.txt file
+          $path = drupal_get_path('module', 'tableofcontents');
+          $translations = parse_ini_file($path .'/i18n-ascii.txt');
+          $anchor = strtr($anchor, $translations);
+
+          $anchor = preg_replace("/[^A-Za-z0-9:_.-]/", "", $anchor);
           $anchor = preg_replace("/^[0-9]+/", "", $anchor);
         }
 
