Index: pear_override/render/Xhtml/Redirect.php
===================================================================
--- pear_override/render/Xhtml/Redirect.php	(revision 0)
+++ pear_override/render/Xhtml/Redirect.php	(revision 3110)
@@ -0,0 +1,49 @@
+<?php
+
+/**
+* 
+* Render for wiki redirects.
+* 
+* @category Text
+* 
+* @package Text_Wiki
+* 
+* @author Rodrigo Sampaio Primo <rodrigo@utopia.org.br>
+* 
+* @license LGPL
+* 
+*/
+
+/**
+* 
+* Render for wiki redirects.
+* 
+* This class implements a Text_Wiki_Render to output text marked to
+* be a wiki redirect.
+*
+* @category Text
+* 
+* @package Text_Wiki
+* 
+* @author Rodrigo Sampaio Primo <rodrigo@utopia.org.br>
+* 
+*/
+
+class Text_Wiki_Render_Xhtml_Redirect extends Text_Wiki_Render {
+    function token($options)
+    {
+        if ($options['type'] == 'end') {
+            return '"}';
+        } else if ($options['type'] == 'start') {
+            // When wikitools is enabled, just create a wikitools link.
+            global $pearwiki_current_format;
+            if (pearwiki_filter_use_wikitools($pearwiki_current_format) && module_exists('wikitools')) {
+              $page = $options['text'];
+              $path = wikitools_wikilink_drupal_path($page);
+              drupal_goto($path);
+            }
+            return '{redirect page="';
+        }
+    }
+}
+
