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

Data Fields

const TYPE = 'qpl_usersolution'

Protected Member Functions

 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.ilAssHtmlUserSolutionPurifier.php.

Member Function Documentation

ilAssHtmlUserSolutionPurifier::getAllowedElements ( )
private

Definition at line 36 of file class.ilAssHtmlUserSolutionPurifier.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:

ilAssHtmlUserSolutionPurifier::getElementsUsedForAdvancedEditing ( )
private

Definition at line 46 of file class.ilAssHtmlUserSolutionPurifier.php.

References ilObjAdvancedEditing\_getUsedHTMLTags().

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:

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

Reimplemented from ilHtmlPurifierAbstractLibWrapper.

Definition at line 19 of file class.ilAssHtmlUserSolutionPurifier.php.

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

{
$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');
$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:

Field Documentation

const ilAssHtmlUserSolutionPurifier::TYPE = 'qpl_usersolution'

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


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