--- codefilter.module 2007-12-06 02:04:04.000000000 +0000 +++ /var/www/localhost/htdocs/voting/drupal-5.5/sites/all/modules/codefilter/codefilter.module 2008-01-13 21:19:40.000000000 +0000 @@ -101,15 +101,14 @@ return t('Allows users to post code verbatim using <code> and <?php ?> tags.'); case 'prepare': - // Note: we use the bytes 0xFE and 0xFF to replace < > during the filtering process. - // These bytes are not valid in UTF-8 data and thus least likely to cause problems. - $text = preg_replace('@(.+?)@se', "'\xFEcode\xFF'. codefilter_escape('\\1') .'\xFE/code\xFF'", $text); - $text = preg_replace('@[\[<](\?php|%)(.+?)(\?|%)[\]>]@se', "'\xFEphp\xFF'. codefilter_escape('\\2') .'\xFE/php\xFF'", $text); + // Note: we replace , , , [?php ], <% %>, and [% %] during the filtering process. + $text = preg_replace('@(.+?)@se', "'[codefilter-'.'code]'. codefilter_escape('\\1') .'[/code'.'-codefilter]'", $text); + $text = preg_replace('@[\[<](\?php|%)(.+?)(\?|%)[\]>]@se', "'[codefilter-'.'php]'. codefilter_escape('\\2') .'[/php'.'-codefilter]'", $text); return $text; case 'process': - $text = preg_replace('@\xFEcode\xFF(.+?)\xFE/code\xFF@se', "codefilter_process_code('$1')", $text); - $text = preg_replace('@\xFEphp\xFF(.+?)\xFE/php\xFF@se', "codefilter_process_php('$1')", $text); + $text = preg_replace('@[codefilter-'.'code](.+?)[/code'.'-codefilter]@se', "codefilter_process_code('$1')", $text); + $text = preg_replace('@[codefilter-'.'php](.+?)[/php'.'-codefilter]@se', "codefilter_process_php('$1')", $text); return $text; default: @@ -117,4 +116,3 @@ } } -