forked from extern/egroupware
Added HTMLPurifier (http://htmlpurifier.org/) Version 3.3.0
- can be used via html class like: $clean_html = html::purify($html); - using it now in eTemplate to remove malicious code from html: a) when displaying "formatted text" b) when "formatted text" get's input by the user
This commit is contained in:
23
phpgwapi/inc/htmlpurifier/library/HTMLPurifier/HTMLModule/Target.php
Executable file
23
phpgwapi/inc/htmlpurifier/library/HTMLPurifier/HTMLModule/Target.php
Executable file
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* XHTML 1.1 Target Module, defines target attribute in link elements.
|
||||
*/
|
||||
class HTMLPurifier_HTMLModule_Target extends HTMLPurifier_HTMLModule
|
||||
{
|
||||
|
||||
public $name = 'Target';
|
||||
|
||||
public function setup($config) {
|
||||
$elements = array('a');
|
||||
foreach ($elements as $name) {
|
||||
$e = $this->addBlankElement($name);
|
||||
$e->attr = array(
|
||||
'target' => new HTMLPurifier_AttrDef_HTML_FrameTarget()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// vim: et sw=4 sts=4
|
Reference in New Issue
Block a user