This repository was archived by the owner on Jul 15, 2019. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ See the accompanying LICENSE file for terms.
2525 this . cssParser = new CssParser ( { "ver" : "strict" , "throwError" : false } ) ;
2626 }
2727
28+ // TODO: introduce polyfill for Array.indexOf
2829 function contains ( arr , element ) {
2930 for ( var i = 0 , len = arr . length ; i < len ; i ++ ) {
3031 if ( arr [ i ] === element ) {
@@ -49,14 +50,11 @@ See the accompanying LICENSE file for terms.
4950 case 1 :
5051 this . output += ch ;
5152 break ;
53+
5254 case 2 :
53- if ( prevState === 35 ) {
54- this . attrVals [ attributeName ] = attributeValue ;
55- }
56- if ( prevState === 36 ) {
57- this . attrVals [ attributeName ] = attributeValue ;
58- }
59- if ( prevState === 40 ) {
55+ if ( prevState === 35 ||
56+ prevState === 36 ||
57+ prevState === 40 ) {
6058 this . attrVals [ attributeName ] = attributeValue ;
6159 }
6260
Original file line number Diff line number Diff line change @@ -121,7 +121,6 @@ Whitelist.Tags = [
121121 "wbr"
122122] ;
123123
124-
125124Whitelist . Attributes = [
126125 "ept" ,
127126 "acceptCharset" ,
@@ -222,22 +221,22 @@ Whitelist.Attributes = [
222221] ;
223222
224223Whitelist . HrefAttributes = [
225- "action" ,
226- "background" ,
227- "codebase" ,
228- "cite" ,
229- "classid" ,
230- "formaction" ,
231- "folder" ,
232- "href" ,
233- "icon" ,
234- "longdesc" ,
235- "manifest" ,
236- "profile" ,
237- "poster" ,
238- "src" ,
239- "usemap" ,
240- "xlink:href"
224+ "action" ,
225+ "background" ,
226+ "codebase" ,
227+ "cite" ,
228+ "classid" ,
229+ "formaction" ,
230+ "folder" ,
231+ "href" ,
232+ "icon" ,
233+ "longdesc" ,
234+ "manifest" ,
235+ "profile" ,
236+ "poster" ,
237+ "src" ,
238+ "usemap" ,
239+ "xlink:href"
241240] ;
242241
243242module . exports = Whitelist ;
You can’t perform that action at this time.
0 commit comments