ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilAssHtmlPurifier Class Reference
+ Inheritance diagram for ilAssHtmlPurifier:
+ Collaboration diagram for ilAssHtmlPurifier:

Protected Member Functions

 getPurifierType ()
 getPurifierConfigInstance ()
- 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)

Private Member Functions

 getAllowedElements ()
 getElementsUsedForAdvancedEditing ()

Additional Inherited Members

- Public Member Functions inherited from ilHtmlPurifierAbstractLibWrapper
 __construct ()
 Constructor.
 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.
- 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

Definition at line 12 of file class.ilAssHtmlPurifier.php.

Member Function Documentation

ilAssHtmlPurifier::getAllowedElements ( )
private

Definition at line 38 of file class.ilAssHtmlPurifier.php.

References getElementsUsedForAdvancedEditing(), ilHtmlPurifierAbstractLibWrapper\makeElementListTinyMceCompliant(), and ilHtmlPurifierAbstractLibWrapper\removeUnsupportedElements().

Referenced by getPurifierConfigInstance().

{
$allowedElements = $this->getElementsUsedForAdvancedEditing();
$allowedElements = $this->makeElementListTinyMceCompliant($allowedElements);
$allowedElements = $this->removeUnsupportedElements($allowedElements);
return $allowedElements;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilAssHtmlPurifier::getElementsUsedForAdvancedEditing ( )
private

Definition at line 48 of file class.ilAssHtmlPurifier.php.

References ilObjAdvancedEditing\_getUsedHTMLTags(), and getPurifierType().

Referenced by getAllowedElements().

{
include_once 'Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php';
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilAssHtmlPurifier::getPurifierConfigInstance ( )
protected
Returns
HTMLPurifier_Config Instance of HTMLPurifier_Config

Reimplemented from ilHtmlPurifierAbstractLibWrapper.

Definition at line 22 of file class.ilAssHtmlPurifier.php.

References ilHtmlPurifierAbstractLibWrapper\_getCacheDirectory(), HTMLPurifier_Config\createDefault(), getAllowedElements(), and getPurifierType().

{
$config->set('HTML.DefinitionID', $this->getPurifierType());
$config->set('HTML.DefinitionRev', 1);
$config->set('Cache.SerializerPath', ilHtmlPurifierAbstractLibWrapper::_getCacheDirectory());
$config->set('HTML.Doctype', 'XHTML 1.0 Strict');
$config->set('HTML.AllowedElements', $this->getAllowedElements());
$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:

ilAssHtmlPurifier::getPurifierType ( )
protected

Definition at line 14 of file class.ilAssHtmlPurifier.php.

Referenced by getElementsUsedForAdvancedEditing(), and getPurifierConfigInstance().

{
return 'assessment';
}

+ Here is the caller graph for this function:


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