ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ 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
$context
$context
Definition:
webdav.php:25
HTMLPurifier_AttrDef
Base class for all validating attribute definitions.
Definition:
AttrDef.php:13
$config
$config
Definition:
bootstrap.php:15
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
php
libs
composer
vendor
ezyang
htmlpurifier
library
HTMLPurifier
AttrDef
CSS
TextDecoration.php
Generated on Thu Jan 16 2025 19:01:38 for ILIAS by
1.8.13 (using
Doxyfile
)