Use Horde_Url, fixes HTML escaping.
authorJan Schneider <jan@horde.org>
Fri, 15 Oct 2010 12:07:16 +0000 (14:07 +0200)
committerJan Schneider <jan@horde.org>
Fri, 15 Oct 2010 12:07:16 +0000 (14:07 +0200)
wicked/lib/Text_Wiki/Render/Xhtml/Registrylink.php

index 68ae2ca..60f1ca4 100644 (file)
@@ -18,12 +18,13 @@ class Text_Wiki_Render_Xhtml_Registrylink extends Text_Wiki_Render {
      */
     function token($options)
     {
-        $link = $GLOBALS['registry']->link($options['method'], $options['args']);
-        if (is_a($link, 'PEAR_Error')) {
+        try {
+            $link = new Horde_Url($GLOBALS['registry']->link($options['method'], $options['args']));
+        } catch (Horde_Exception $e) {
             return '';
         }
 
-        return Horde::link($link) . $options['title'] . '</a>';
+        return $link->link() . $options['title'] . '</a>';
     }
 
 }