ILIAS
release_4-4 Revision
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
y
+
Files
File List
+
Globals
+
All
$
(
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
o
p
r
s
t
u
v
w
x
+
Variables
$
(
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
class.ilHtmlForumPostPurifier.php
Go to the documentation of this file.
1
<?php
2
/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4
require_once
'Services/Html/classes/class.ilHtmlPurifierAbstractLibWrapper.php'
;
5
13
class
ilHtmlForumPostPurifier
extends
ilHtmlPurifierAbstractLibWrapper
14
{
24
public
static
$_type
=
'frm_post'
;
25
32
public
function
__construct
()
33
{
34
parent::__construct();
35
}
36
44
protected
function
getPurifierConfigInstance
()
45
{
46
include_once
'Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php'
;
47
48
$config =
HTMLPurifier_Config::createDefault
();
49
$config->set(
'HTML.DefinitionID'
,
'ilias forum post'
);
50
$config->set(
'HTML.DefinitionRev'
, 1);
51
$config->set(
'Cache.SerializerPath'
,
ilHtmlPurifierAbstractLibWrapper::_getCacheDirectory
());
52
$config->set(
'HTML.Doctype'
,
'XHTML 1.0 Strict'
);
53
54
$tags =
ilObjAdvancedEditing::_getUsedHTMLTags
(self::$_type);
55
$tags = $this->
makeElementListTinyMceCompliant
($tags);
56
$config->set(
'HTML.AllowedElements'
, $this->
removeUnsupportedElements
($tags));
57
$config->set(
'HTML.ForbiddenAttributes'
,
'div@style'
);
58
59
if
($def = $config->maybeGetRawHTMLDefinition()) {
60
$def->addAttribute(
'a'
,
'target'
,
'Enum#_blank,_self,_target,_top'
);
61
}
62
63
return
$config;
64
}
65
}
66
?>
ilHtmlForumPostPurifier
Concrete class for sanitizing html of forum posts.
Definition:
class.ilHtmlForumPostPurifier.php:13
ilHtmlPurifierAbstractLibWrapper\_getCacheDirectory
static _getCacheDirectory()
Get the directory for HTMLPurifier cache files.
Definition:
class.ilHtmlPurifierAbstractLibWrapper.php:117
ilHtmlPurifierAbstractLibWrapper\removeUnsupportedElements
removeUnsupportedElements($a_array)
Removes all unsupported elements.
Definition:
class.ilHtmlPurifierAbstractLibWrapper.php:137
ilHtmlForumPostPurifier\getPurifierConfigInstance
getPurifierConfigInstance()
Concrete function which builds a html purifier config instance.
Definition:
class.ilHtmlForumPostPurifier.php:44
ilHtmlPurifierAbstractLibWrapper
Abstract class wrapping the HTMLPurifier instance.
Definition:
class.ilHtmlPurifierAbstractLibWrapper.php:15
ilHtmlForumPostPurifier\$_type
static $_type
Definition:
class.ilHtmlForumPostPurifier.php:24
ilHtmlForumPostPurifier\__construct
__construct()
Constructor.
Definition:
class.ilHtmlForumPostPurifier.php:32
HTMLPurifier_Config\createDefault
static createDefault()
Convenience constructor that creates a default configuration object.
Definition:
Config.php:138
ilObjAdvancedEditing\_getUsedHTMLTags
& _getUsedHTMLTags($a_module="")
Returns an array of all allowed HTML tags for text editing.
Definition:
class.ilObjAdvancedEditing.php:190
ilHtmlPurifierAbstractLibWrapper\makeElementListTinyMceCompliant
makeElementListTinyMceCompliant($elements)
Definition:
class.ilHtmlPurifierAbstractLibWrapper.php:165
Services
Html
classes
class.ilHtmlForumPostPurifier.php
Generated on Mon Dec 21 2020 19:01:15 for ILIAS by
1.8.13 (using
Doxyfile
)