ILIAS
Release_5_0_x_branch Revision 61816
◀ ilDoc Overview
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
Examples
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Groups
Pages
class.ilAssHtmlPurifier.php
Go to the documentation of this file.
1
<?php
2
/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4
require_once
'Services/Html/classes/class.ilHtmlPurifierAbstractLibWrapper.php'
;
5
12
abstract
class
ilAssHtmlPurifier
extends
ilHtmlPurifierAbstractLibWrapper
13
{
14
protected
function
getPurifierType
()
15
{
16
return
'assessment'
;
17
}
18
22
protected
function
getPurifierConfigInstance
()
23
{
24
$config =
HTMLPurifier_Config::createDefault
();
25
$config->set(
'HTML.DefinitionID'
, $this->
getPurifierType
());
26
$config->set(
'HTML.DefinitionRev'
, 1);
27
$config->set(
'Cache.SerializerPath'
,
ilHtmlPurifierAbstractLibWrapper::_getCacheDirectory
());
28
$config->set(
'HTML.Doctype'
,
'XHTML 1.0 Strict'
);
29
$config->set(
'HTML.AllowedElements'
, $this->
getAllowedElements
());
30
$config->set(
'HTML.ForbiddenAttributes'
,
'div@style'
);
31
if
($def = $config->maybeGetRawHTMLDefinition()) {
32
$def->addAttribute(
'a'
,
'target'
,
'Enum#_blank,_self,_target,_top'
);
33
}
34
35
return
$config;
36
}
37
38
private
function
getAllowedElements
()
39
{
40
$allowedElements = $this->
getElementsUsedForAdvancedEditing
();
41
42
$allowedElements = $this->
makeElementListTinyMceCompliant
($allowedElements);
43
$allowedElements = $this->
removeUnsupportedElements
($allowedElements);
44
45
return
$allowedElements;
46
}
47
48
private
function
getElementsUsedForAdvancedEditing
()
49
{
50
include_once
'Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php'
;
51
return
ilObjAdvancedEditing::_getUsedHTMLTags
($this->
getPurifierType
());
52
}
53
}
Modules
TestQuestionPool
classes
class.ilAssHtmlPurifier.php
Generated on Wed Apr 27 2016 21:01:21 for ILIAS by
1.8.1.2 (using
Doxyfile
)