westbywest

Reviews(1)
 
bywestbywest, September 8, 2009
I was able to fix the problem described above with HTML purifier plugin stripping anchor links.

This involved swapping out the "library" folder in the htmlpurifier plugin directory tree with that found in v3.3.0 of HTML Purifier Lite, available here:
http://htmlpurifier.org/releases/

The required additions to htmlpurifier.php are described below:
http://htmlpurifier.org/phorum/read.php?3,2720

In particular you need to add these lines before the line "purifier = new HTMLPurifier($config);"

// retain anchor links
$config->set('HTML', 'DefinitionID', 'enduser-customize.html tutorial');
$config->set('HTML', 'DefinitionRev', 1);
$def = $config->getHTMLDefinition(true);
$def->addAttribute('a', 'target', 'Enum#_blank,_self,_target,_top');

Also, to avoid some PHP warnings, you will need to change these lines in htmlpurifier.php:

$config->set('Core', 'DefinitionCache', null);
$config->set('HTML', 'EnableAttrID', true);

To these, respectively:

$config->set('Cache', 'DefinitionImpl', null);
$config->set('Attr', 'EnableID', true);
Owner's reply

Thank you very much, there is something i didn't understand properly, can i contact you in private to ask you some questions?