ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
◀ ilDoc Overview
TextDecoration.php
Go to the documentation of this file.
1
<?php
2
8
class
HTMLPurifier_AttrDef_CSS_TextDecoration
extends
HTMLPurifier_AttrDef
9
{
10
17
public
function
validate
($string,
$config
, $context)
18
{
19
static
$allowed_values =
array
(
20
'line-through'
=>
true
,
21
'overline'
=>
true
,
22
'underline'
=>
true
,
23
);
24
25
$string = strtolower($this->
parseCDATA
($string));
26
27
if
($string ===
'none'
) {
28
return
$string;
29
}
30
31
$parts = explode(
' '
, $string);
32
$final =
''
;
33
foreach
($parts as $part) {
34
if
(isset($allowed_values[$part])) {
35
$final .= $part .
' '
;
36
}
37
}
38
$final = rtrim($final);
39
if
($final ===
''
) {
40
return
false
;
41
}
42
return
$final;
43
}
44
}
45
46
// vim: et sw=4 sts=4
$config
$config
Definition:
flush-definition-cache.php:23
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:60
HTMLPurifier_AttrDef_CSS_TextDecoration\validate
validate($string, $config, $context)
Definition:
TextDecoration.php:17
array
Create styles array
The data for the language used.
Definition:
40duplicateStyle.php:19
libs
composer
vendor
ezyang
htmlpurifier
library
HTMLPurifier
AttrDef
CSS
TextDecoration.php
Generated on Sat Jan 18 2025 19:01:01 for ILIAS by
1.8.13 (using
Doxyfile
)