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
TextDecoration.php
Go to the documentation of this file.
1
<?php
2
8
class
HTMLPurifier_AttrDef_CSS_TextDecoration
extends
HTMLPurifier_AttrDef
9
{
10
11
public
function
validate
($string, $config, $context) {
12
13
static
$allowed_values = array(
14
'line-through'
=>
true
,
15
'overline'
=>
true
,
16
'underline'
=>
true
,
17
);
18
19
$string = strtolower($this->
parseCDATA
($string));
20
21
if
($string ===
'none'
)
return
$string;
22
23
$parts = explode(
' '
, $string);
24
$final =
''
;
25
foreach
($parts as $part) {
26
if
(isset($allowed_values[$part])) {
27
$final .= $part .
' '
;
28
}
29
}
30
$final = rtrim($final);
31
if
($final ===
''
)
return
false
;
32
return
$final;
33
34
}
35
36
}
37
38
// vim: et sw=4 sts=4
HTMLPurifier_AttrDef
Base class for all validating attribute definitions.
Definition:
AttrDef.php:13
HTMLPurifier_AttrDef_CSS_TextDecoration
Validates the value for the CSS property text-decoration.
Definition:
TextDecoration.php:8
HTMLPurifier_AttrDef\parseCDATA
parseCDATA($string)
Convenience method that parses a string as if it were CDATA.
Definition:
AttrDef.php:58
HTMLPurifier_AttrDef_CSS_TextDecoration\validate
validate($string, $config, $context)
Definition:
TextDecoration.php:11
Services
Html
HtmlPurifier
library
HTMLPurifier
AttrDef
CSS
TextDecoration.php
Generated on Mon Dec 21 2020 19:01:15 for ILIAS by
1.8.13 (using
Doxyfile
)