File tree 2 files changed +69
-10
lines changed
2 files changed +69
-10
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " html5parser" ,
3
3
"description" : " A fast, accurate AST parser for HTML5" ,
4
- "version" : " 1.2.0 " ,
4
+ "version" : " 1.2.1 " ,
5
5
"author" :
" acrazing <[email protected] >" ,
6
6
"keywords" : [
7
7
" html5" ,
Original file line number Diff line number Diff line change @@ -16,31 +16,90 @@ export interface SafeHtmlOptions {
16
16
17
17
export const safeHtmlDefaultOptions : SafeHtmlOptions = {
18
18
allowedTags : [
19
+ 'a' ,
20
+ 'abbr' ,
21
+ 'address' ,
22
+ 'area' ,
23
+ 'article' ,
24
+ 'aside' ,
25
+ 'b' ,
26
+ 'bdi' ,
27
+ 'bdo' ,
28
+ 'big' ,
29
+ 'blockquote' ,
30
+ 'br' ,
31
+ 'button' ,
32
+ 'caption' ,
33
+ 'cite' ,
34
+ 'code' ,
35
+ 'col' ,
36
+ 'colgroup' ,
37
+ 'data' ,
38
+ 'dd' ,
39
+ 'del' ,
40
+ 'dfn' ,
19
41
'div' ,
20
- 'p' ,
42
+ 'dl' ,
43
+ 'dt' ,
44
+ 'em' ,
45
+ 'figcaption' ,
46
+ 'figure' ,
47
+ 'footer' ,
21
48
'h1' ,
22
49
'h2' ,
23
50
'h3' ,
24
51
'h4' ,
25
52
'h5' ,
26
53
'h6' ,
27
- 'ol' ,
28
- 'ul' ,
54
+ 'header' ,
55
+ 'hgroup' ,
56
+ 'hr' ,
57
+ 'i' ,
58
+ 'img' ,
59
+ 'ins' ,
60
+ 'kbd' ,
29
61
'li' ,
62
+ 'main' ,
63
+ 'map' ,
64
+ 'ol' ,
65
+ 'p' ,
66
+ 'picture' ,
67
+ 'pre' ,
68
+ 'q' ,
69
+ 'rp' ,
70
+ 'rt' ,
71
+ 'ruby' ,
72
+ 's' ,
73
+ 'samp' ,
74
+ 'section' ,
75
+ 'small' ,
76
+ 'span' ,
77
+ 'strong' ,
78
+ 'sub' ,
79
+ 'summary' ,
80
+ 'sup' ,
30
81
'table' ,
31
- 'thead' ,
32
82
'tbody' ,
33
- 'tr' ,
34
- 'th' ,
35
83
'td' ,
36
- 'span' ,
37
- 'a' ,
38
- 'img' ,
84
+ 'tfoot' ,
85
+ 'th' ,
86
+ 'thead' ,
87
+ 'time' ,
88
+ 'tr' ,
89
+ 'u' ,
90
+ 'ul' ,
91
+ 'var' ,
92
+ 'wbr' ,
39
93
] ,
40
94
allowedAttrs : [ 'style' ] ,
41
95
tagAllowedAttrs : {
42
96
a : [ 'href' , 'target' ] ,
43
97
img : [ 'src' ] ,
98
+ td : [ 'rowspan' , 'colspan' ] ,
99
+ th : [ 'rowspan' , 'colspan' ] ,
100
+ time : [ 'datetime' ] ,
101
+ colgroup : [ 'span' ] ,
102
+ col : [ 'span' ] ,
44
103
} ,
45
104
allowedUrl : / ^ (?: m a i l t o | t e l | h t t p s ? | f t p | [ ^ : ] * [ ^ a - z 0 - 9 . + - ] [ ^ : ] * ) : | ^ [ ^ : ] * $ / i,
46
105
} ;
You can’t perform that action at this time.
0 commit comments