mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
News download: Fix broken handling of nesting for HTML 5 tags when parsing with BeautifulSoup
This commit is contained in:
parent
dfed990a65
commit
a19f8999cc
@ -1454,7 +1454,9 @@ class BeautifulSoup(BeautifulStoneSoup):
|
|||||||
#According to the HTML standard, these block tags can contain
|
#According to the HTML standard, these block tags can contain
|
||||||
#another tag of the same type. Furthermore, it's common
|
#another tag of the same type. Furthermore, it's common
|
||||||
#to actually use these tags this way.
|
#to actually use these tags this way.
|
||||||
NESTABLE_BLOCK_TAGS = ['blockquote', 'div', 'fieldset', 'ins', 'del']
|
# Changed by Kovid: Added HTML 5 block tags
|
||||||
|
NESTABLE_BLOCK_TAGS = ['blockquote', 'div', 'fieldset', 'ins', 'del',
|
||||||
|
'article', 'aside', 'header', 'footer', 'nav', 'figcaption', 'figure', 'section']
|
||||||
|
|
||||||
#Lists can contain other lists, but there are restrictions.
|
#Lists can contain other lists, but there are restrictions.
|
||||||
NESTABLE_LIST_TAGS = { 'ol' : [],
|
NESTABLE_LIST_TAGS = { 'ol' : [],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user