ILIAS
Release_4_4_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.ilAssHtmlUserSolutionPurifier.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
class
ilAssHtmlUserSolutionPurifier
extends
ilHtmlPurifierAbstractLibWrapper
13
{
14
const
TYPE
=
'qpl_usersolution'
;
15
19
protected
function
getPurifierConfigInstance
()
20
{
21
$config =
HTMLPurifier_Config::createDefault
();
22
$config->set(
'HTML.DefinitionID'
,
'ilias forum post'
);
23
$config->set(
'HTML.DefinitionRev'
, 1);
24
$config->set(
'Cache.SerializerPath'
,
ilHtmlPurifierAbstractLibWrapper::_getCacheDirectory
());
25
$config->set(
'HTML.Doctype'
,
'XHTML 1.0 Strict'
);
26
$config->set(
'HTML.AllowedElements'
, $this->
getAllowedElements
());
27
$config->set(
'HTML.ForbiddenAttributes'
,
'div@style'
);
28
29
if
($def = $config->maybeGetRawHTMLDefinition()) {
30
$def->addAttribute(
'a'
,
'target'
,
'Enum#_blank,_self,_target,_top'
);
31
}
32
33
return
$config;
34
}
35
36
private
function
getAllowedElements
()
37
{
38
$allowedElements = $this->
getElementsUsedForAdvancedEditing
();
39
40
$allowedElements = $this->
makeElementListTinyMceCompliant
($allowedElements);
41
$allowedElements = $this->
removeUnsupportedElements
($allowedElements);
42
43
return
$allowedElements;
44
}
45
46
private
function
getElementsUsedForAdvancedEditing
()
47
{
48
include_once
'Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php'
;
49
return
ilObjAdvancedEditing::_getUsedHTMLTags
(self::TYPE);
50
}
51
}
Modules
TestQuestionPool
classes
class.ilAssHtmlUserSolutionPurifier.php
Generated on Wed Apr 27 2016 20:01:27 for ILIAS by
1.8.1.2 (using
Doxyfile
)