File tree 2 files changed +6
-3
lines changed
2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -1019,9 +1019,7 @@ def startTagBody(self, token):
1019
1019
assert self .parser .innerHTML
1020
1020
else :
1021
1021
self .parser .framesetOK = False
1022
- for attr , value in token ["data" ].items ():
1023
- if attr not in self .tree .openElements [1 ].attributes :
1024
- self .tree .openElements [1 ].attributes [attr ] = value
1022
+ self .tree .apply_body_attributes (token ['data' ])
1025
1023
1026
1024
def startTagFrameset (self , token ):
1027
1025
self .parser .parseError ("unexpected-start-tag" , {"name" : "frameset" })
Original file line number Diff line number Diff line change @@ -274,6 +274,11 @@ def apply_html_attributes(self, attrs):
274
274
if attr not in self .openElements [0 ].attributes :
275
275
self .openElements [0 ].attributes [attr ] = value
276
276
277
+ def apply_body_attributes (self , attrs ):
278
+ for attr , value in attrs .items ():
279
+ if attr not in self .tree .openElements [1 ].attributes :
280
+ self .tree .openElements [1 ].attributes [attr ] = value
281
+
277
282
def _getInsertFromTable (self ):
278
283
return self ._insertFromTable
279
284
You can’t perform that action at this time.
0 commit comments