Commit | Line | Data |
---|---|---|
cb5717ef | 1 | package HTML::Tags; |
2 | ||
3 | use strict; | |
4 | use warnings FATAL => 'all'; | |
5 | use XML::Tags (); | |
6 | ||
7 | my @HTML_TAGS = qw( | |
80671589 | 8 | a |
9 | abbr | |
10 | address | |
11 | area | |
12 | article | |
13 | aside | |
14 | audio | |
15 | b | |
16 | base | |
17 | bb | |
18 | bdo | |
19 | blockquote | |
20 | body | |
21 | br | |
22 | button | |
23 | canvas | |
24 | caption | |
25 | cite | |
26 | code | |
27 | col | |
28 | colgroup | |
29 | command | |
30 | datagrid | |
31 | datalist | |
32 | dd | |
33 | del | |
34 | details | |
35 | dialog | |
36 | dfn | |
37 | div | |
38 | dl | |
39 | dt | |
40 | em | |
41 | embed | |
42 | eventsource | |
43 | fieldset | |
44 | figure | |
45 | footer | |
46 | form | |
47 | h1 | |
48 | h2 | |
49 | h3 | |
50 | h4 | |
51 | h5 | |
52 | h6 | |
53 | head | |
54 | header | |
55 | hr | |
56 | html | |
57 | i | |
58 | iframe | |
59 | img | |
60 | input | |
61 | ins | |
62 | kbd | |
63 | label | |
64 | legend | |
65 | li | |
66 | link | |
67 | mark | |
68 | map | |
69 | menu | |
70 | meta | |
71 | meter | |
72 | nav | |
73 | noscript | |
74 | object | |
75 | ol | |
76 | optgroup | |
77 | option | |
78 | output | |
79 | p | |
80 | param | |
81 | pre | |
82 | progress | |
83 | q | |
84 | ruby | |
85 | rp | |
86 | rt | |
87 | samp | |
88 | script | |
89 | section | |
90 | select | |
91 | small | |
92 | source | |
93 | span | |
94 | strong | |
95 | style | |
96 | sub | |
97 | sup | |
98 | table | |
99 | tbody | |
100 | td | |
101 | textarea | |
102 | tfoot | |
103 | th | |
104 | thead | |
105 | time | |
106 | title | |
107 | tr | |
108 | ul | |
109 | var | |
110 | video | |
cb5717ef | 111 | ); |
112 | ||
113 | sub import { | |
114 | my ($class, @rest) = @_; | |
115 | my $opts = ref($rest[0]) eq 'HASH' ? shift(@rest) : {}; | |
116 | ($opts->{into_level}||=1)++; | |
117 | XML::Tags->import($opts, @HTML_TAGS, @rest); | |
118 | } | |
119 | ||
49a6c0b5 | 120 | sub to_html_string { XML::Tags::to_xml_string(@_) } |
121 | ||
cb5717ef | 122 | 1; |