ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilHtmlForumPostPurifier Class Reference

Concrete class for sanitizing html of forum posts. More...

+ Inheritance diagram for ilHtmlForumPostPurifier:
+ Collaboration diagram for ilHtmlForumPostPurifier:

Public Member Functions

 __construct ()
 Constructor.
- Public Member Functions inherited from ilHtmlPurifierAbstractLibWrapper
 purify ($a_html, $a_config=null)
 Filters an HTML snippet/document to be XSS-free and standards-compliant.
 purifyArray (Array $a_array_of_html, $a_config=null)
 Filters an array of HTML snippets/documents to be XSS-free and standards-compliant.
- Public Member Functions inherited from ilHtmlPurifierInterface
 purify ($a_html)
 Filters an HTML snippet/document to be XSS-free and standards-compliant.
 purifyArray (Array $a_array_of_html)
 Filters an array of HTML snippets/documents to be XSS-free and standards-compliant.

Static Public Attributes

static $_type = 'frm_post'

Protected Member Functions

 getPurifierConfigInstance ()
 Concrete function which builds a html purifier config instance.
- Protected Member Functions inherited from ilHtmlPurifierAbstractLibWrapper
 setPurifier (HTMLPurifier $oPurifier)
 Set the purifier by subclass.
 getPurifier ()
 Get the purifier.
 removeUnsupportedElements ($a_array)
 Removes all unsupported elements.
 makeElementListTinyMceCompliant ($elements)

Additional Inherited Members

- Static Public Member Functions inherited from ilHtmlPurifierAbstractLibWrapper
static _getCacheDirectory ()
 Get the directory for HTMLPurifier cache files.
- Protected Attributes inherited from ilHtmlPurifierAbstractLibWrapper
 $oPurifier = null

Detailed Description

Concrete class for sanitizing html of forum posts.

Author
Michael Jansen mjans.nosp@m.en@d.nosp@m.ataba.nosp@m.y.de
Version
$Id$

Definition at line 13 of file class.ilHtmlForumPostPurifier.php.

Constructor & Destructor Documentation

ilHtmlForumPostPurifier::__construct ( )

Constructor.

public

Reimplemented from ilHtmlPurifierAbstractLibWrapper.

Definition at line 32 of file class.ilHtmlForumPostPurifier.php.

Member Function Documentation

ilHtmlForumPostPurifier::getPurifierConfigInstance ( )
protected

Concrete function which builds a html purifier config instance.

protected

Returns
HTMLPurifier_Config Instance of HTMLPurifier_Config

Reimplemented from ilHtmlPurifierAbstractLibWrapper.

Definition at line 44 of file class.ilHtmlForumPostPurifier.php.

References ilHtmlPurifierAbstractLibWrapper\_getCacheDirectory(), ilObjAdvancedEditing\_getUsedHTMLTags(), HTMLPurifier_Config\createDefault(), ilHtmlPurifierAbstractLibWrapper\makeElementListTinyMceCompliant(), and ilHtmlPurifierAbstractLibWrapper\removeUnsupportedElements().

{
include_once 'Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php';
$config->set('HTML.DefinitionID', 'ilias forum post');
$config->set('HTML.DefinitionRev', 1);
$config->set('Cache.SerializerPath', ilHtmlPurifierAbstractLibWrapper::_getCacheDirectory());
$config->set('HTML.Doctype', 'XHTML 1.0 Strict');
$tags = $this->makeElementListTinyMceCompliant($tags);
$config->set('HTML.AllowedElements', $this->removeUnsupportedElements($tags));
$config->set('HTML.ForbiddenAttributes', 'div@style');
if ($def = $config->maybeGetRawHTMLDefinition()) {
$def->addAttribute('a', 'target', 'Enum#_blank,_self,_target,_top');
}
return $config;
}

+ Here is the call graph for this function:

Field Documentation

ilHtmlForumPostPurifier::$_type = 'frm_post'
static

Definition at line 24 of file class.ilHtmlForumPostPurifier.php.


The documentation for this class was generated from the following file: