ILIAS
release_5-0 Revision 5.0.0-1144-gc4397b1f870
◀ 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
x
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
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
NameSync.php
Go to the documentation of this file.
1
<?php
2
8
class
HTMLPurifier_AttrTransform_NameSync
extends
HTMLPurifier_AttrTransform
9
{
10
11
public
function
__construct
()
12
{
13
$this->idDef =
new
HTMLPurifier_AttrDef_HTML_ID
();
14
}
15
22
public
function
transform
($attr, $config, $context)
23
{
24
if
(!isset($attr[
'name'
])) {
25
return
$attr;
26
}
27
$name = $attr[
'name'
];
28
if
(isset($attr[
'id'
]) && $attr[
'id'
] === $name) {
29
return
$attr;
30
}
31
$result
= $this->idDef->validate($name, $config, $context);
32
if
(
$result
===
false
) {
33
unset($attr[
'name'
]);
34
}
else
{
35
$attr[
'name'
] =
$result
;
36
}
37
return
$attr;
38
}
39
}
40
41
// vim: et sw=4 sts=4
HTMLPurifier_AttrTransform
Processes an entire attribute array for corrections needing multiple values.
Definition:
AttrTransform.php:17
$result
$result
Definition:
CleanUpTest.php:407
HTMLPurifier_AttrTransform_NameSync\transform
transform($attr, $config, $context)
Definition:
NameSync.php:22
HTMLPurifier_AttrDef_HTML_ID
Validates the HTML attribute ID.
Definition:
ID.php:12
HTMLPurifier_AttrTransform_NameSync
Post-transform that performs validation to the name attribute; if it is present with an equivalent id...
Definition:
NameSync.php:8
HTMLPurifier_AttrTransform_NameSync\__construct
__construct()
Definition:
NameSync.php:11
Services
Html
HtmlPurifier
library
HTMLPurifier
AttrTransform
NameSync.php
Generated on Mon Apr 7 2025 19:00:51 for ILIAS by
1.8.13 (using
Doxyfile
)