XOOPS 2.5.6
Final
Main Page
Related Pages
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Pages
Text.php
Go to the documentation of this file.
1
<?php
2
15
class
HTMLPurifier_HTMLModule_Text
extends
HTMLPurifier_HTMLModule
16
{
17
18
public
$name
=
'Text'
;
19
public
$content_sets
= array(
20
'Flow'
=>
'Heading | Block | Inline'
21
);
22
23
public
function
setup
(
$config
) {
24
25
// Inline Phrasal -------------------------------------------------
26
$this->
addElement
(
'abbr'
,
'Inline'
,
'Inline'
,
'Common'
);
27
$this->
addElement
(
'acronym'
,
'Inline'
,
'Inline'
,
'Common'
);
28
$this->
addElement
(
'cite'
,
'Inline'
,
'Inline'
,
'Common'
);
29
$this->
addElement
(
'dfn'
,
'Inline'
,
'Inline'
,
'Common'
);
30
$this->
addElement
(
'kbd'
,
'Inline'
,
'Inline'
,
'Common'
);
31
$this->
addElement
(
'q'
,
'Inline'
,
'Inline'
,
'Common'
, array(
'cite'
=>
'URI'
));
32
$this->
addElement
(
'samp'
,
'Inline'
,
'Inline'
,
'Common'
);
33
$this->
addElement
(
'var'
,
'Inline'
,
'Inline'
,
'Common'
);
34
35
$em = $this->
addElement
(
'em'
,
'Inline'
,
'Inline'
,
'Common'
);
36
$em->formatting =
true
;
37
38
$strong = $this->
addElement
(
'strong'
,
'Inline'
,
'Inline'
,
'Common'
);
39
$strong->formatting =
true
;
40
41
$code = $this->
addElement
(
'code'
,
'Inline'
,
'Inline'
,
'Common'
);
42
$code->formatting =
true
;
43
44
// Inline Structural ----------------------------------------------
45
$this->
addElement
(
'span'
,
'Inline'
,
'Inline'
,
'Common'
);
46
$this->
addElement
(
'br'
,
'Inline'
,
'Empty'
,
'Core'
);
47
48
// Block Phrasal --------------------------------------------------
49
$this->
addElement
(
'address'
,
'Block'
,
'Inline'
,
'Common'
);
50
$this->
addElement
(
'blockquote'
,
'Block'
,
'Optional: Heading | Block | List'
,
'Common'
, array(
'cite'
=>
'URI'
) );
51
$pre = $this->
addElement
(
'pre'
,
'Block'
,
'Inline'
,
'Common'
);
52
$pre->excludes = $this->
makeLookup
(
53
'img'
,
'big'
,
'small'
,
'object'
,
'applet'
,
'font'
,
'basefont'
);
54
$this->
addElement
(
'h1'
,
'Heading'
,
'Inline'
,
'Common'
);
55
$this->
addElement
(
'h2'
,
'Heading'
,
'Inline'
,
'Common'
);
56
$this->
addElement
(
'h3'
,
'Heading'
,
'Inline'
,
'Common'
);
57
$this->
addElement
(
'h4'
,
'Heading'
,
'Inline'
,
'Common'
);
58
$this->
addElement
(
'h5'
,
'Heading'
,
'Inline'
,
'Common'
);
59
$this->
addElement
(
'h6'
,
'Heading'
,
'Inline'
,
'Common'
);
60
61
// Block Structural -----------------------------------------------
62
$p = $this->
addElement
(
'p'
,
'Block'
,
'Inline'
,
'Common'
);
63
$p->autoclose = array_flip(array(
"address"
,
"blockquote"
,
"center"
,
"dir"
,
"div"
,
"dl"
,
"fieldset"
,
"ol"
,
"p"
,
"ul"
));
64
65
$this->
addElement
(
'div'
,
'Block'
,
'Flow'
,
'Common'
);
66
67
}
68
69
}
70
71
// vim: et sw=4 sts=4
L:
0xoops
xoops-2.5.6
htdocs
xoops_lib
modules
protector
library
HTMLPurifier
HTMLModule
Text.php
Generated on Fri May 10 2013 01:04:23 for XOOPS 2.5.6 by
1.8.3.1