--- g2.module 25 Aug 2007 13:14:03 -0000 1.19.2.2 +++ g2.module 17 Sep 2009 18:26:10 -0000 @@ -952,7 +952,7 @@ * The return value depends on $op. The filter hook is designed so that a * module can return $text for operations it does not use/need. */ -function g2_filter($op, $delta = 0, $format = -1, $text = '') { +function g2_filter($op, $delta = 0, $format = -1, $text = '', $cache_id = 0) { switch ($op) { case 'list': return array(0 => t('G2 Glossary filter')); @@ -963,10 +963,10 @@ 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('@(.+?)@s', "\xFEdfn\xFF\\1\xFE/dfn\xFF", $text); + $text = preg_replace('@(.+?)@se', "'\xFEdfn\xFF\\1\xFE/dfn\xFF'", $text); return $text; - case "process": + case 'process': $text = preg_replace('@\xFEdfn\xFF(.+?)\xFE/dfn\xFF@se', "_g2_filter_process('$1')", $text); return $text;