Index: bbcode-filter.inc =================================================================== RCS file: /cvs/drupal/contributions/modules/bbcode/bbcode-filter.inc,v retrieving revision 1.61 diff -u -p -r1.61 bbcode-filter.inc --- bbcode-filter.inc 26 May 2007 08:28:34 -0000 1.61 +++ bbcode-filter.inc 26 May 2007 16:28:10 -0000 @@ -265,6 +265,18 @@ function _bbcode_filter_process(&$body, $body = preg_replace('#]+)>#i', '', $body); } + // begin processing for [fn|footnote] + if (preg_match_all('#\[(?:fn|footnote)(?::\w+)?\](.*?)\[/(?:fn|footnote)(?::\w+)?\]#si', $body, $footnotes, PREG_SET_ORDER)) { + $text = "\n
\n
    \n"; + $i = 0; + foreach ($footnotes as $fn) { + $fn_title = preg_replace('#(\r\n|\n|\r)#', ' ', check_plain(strip_tags($fn[1]))); + $body = str_replace($fn[0], ''. $i .'', $body); + $text .= '
  1. '. $fn[1] . "
  2. \n"; + } + $body .= $text . "
\n
"; + } // end processing for [fn|footnote] + return $body; }