Skip to content

Commit 5edccdd

Browse files
committed
Handle 'selected' as a binary attribute (value massaged to always True/False), same as 'checked' attribute is handled.
1 parent 4884cd9 commit 5edccdd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

AdvancedHTMLParser/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
}
6767

6868
# These attributes are binary (only accept true/false)
69-
TAG_ITEM_BINARY_ATTRIBUTES = { 'hidden', 'checked' }
69+
TAG_ITEM_BINARY_ATTRIBUTES = { 'hidden', 'checked', 'selected' }
7070

7171
# The opposite of TAG_ITEM_CHANGE_NAME_FROM_ITEM, for going from the attribute name to the object-access name
7272
TAG_ITEM_CHANGE_NAME_FROM_ATTR = { val : key for key, val in TAG_ITEM_CHANGE_NAME_FROM_ITEM.items() }

0 commit comments

Comments
 (0)