4 * Injector that displays the URL of an anchor instead of linking to it, in addition to showing the text of the link.
6 class HTMLPurifier_Injector_DisplayLinkURI
extends HTMLPurifier_Injector
11 public $name = 'DisplayLinkURI';
16 public $needed = array('a');
21 public function handleElement(&$token)
26 * @param HTMLPurifier_Token $token
28 public function handleEnd(&$token)
30 if (isset($token->start
->attr
['href'])) {
31 $url = $token->start
->attr
['href'];
32 unset($token->start
->attr
['href']);
33 $token = array($token, new HTMLPurifier_Token_Text(" ($url)"));