Skip to content

Commit

Permalink
Piano ma sano (hopefuly) going on ...
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.php.net/repository/pear/packages/Text_Wiki/trunk@206415 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information
bertrand Gugger committed Feb 4, 2006
1 parent 0026d47 commit 1002f2a
Showing 1 changed file with 2 additions and 23 deletions.
25 changes: 2 additions & 23 deletions Text/Wiki/Render/Docbook/Phplookup.php
Expand Up @@ -25,12 +25,6 @@
*/
class Text_Wiki_Render_Docbook_Phplookup extends Text_Wiki_Render {

var $conf = array(
'target' => '_blank',
'css' => null
);


/**
*
* Renders a token into text matching the requested format.
Expand All @@ -47,20 +41,6 @@ class Text_Wiki_Render_Docbook_Phplookup extends Text_Wiki_Render {
function token($options)
{
$text = trim($options['text']);
$css = $this->formatConf(' class="%s"', 'css');

// start the html
$output = "<a$css";

// are we targeting another window?
$target = $this->getConf('target', '');
if ($target) {
// use a "popup" window. this is DocBook compliant, suggested by
// Aaron Kalin. uses the $target as the new window name.
$target = htmlspecialchars($target);
$output .= " onclick=\"window.open(this.href, '$target');";
$output .= " return false;\"";
}

// take off the final parens for functions
if (substr($text, -2) == '()') {
Expand All @@ -69,12 +49,11 @@ function token($options)
$q = $text;
}

$q = htmlspecialchars($q);
$q = urlencode($q);
$text = htmlspecialchars($text);

// finish and return
$output .= " href=\"http://php.net/$q\">$text</a>";
return $output;
return '<link xlink:href="http://php.net/' . $q . '">' . $text . '</link>';
}
}
?>

0 comments on commit 1002f2a

Please sign in to comment.