mirror of
https://github.com/yt-dlp/yt-dlp
synced 2024-12-26 21:59:08 +01:00
[parsing] support uppercase SCRIPT tags as suggested by github-advanced-security bot
This commit is contained in:
parent
b35550248a
commit
c34166d7c8
2 changed files with 2 additions and 2 deletions
|
@ -345,7 +345,7 @@ class TestParsing(unittest.TestCase):
|
|||
^^^^^^^^^^^^^^^^^^^^^^^^^^^------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
here is <!-- a comment --> and <!-- another comment --> end
|
||||
----------------^^^^^^^^^^^----------------^^^^^^^^^^^^^^^^^---------
|
||||
<script> ignore here </script> <script> and here </script>
|
||||
<script> ignore here </script> <SCRIPT> and here </SCRIPT>
|
||||
--------^^^^^^^^^^^^^-----------------------------^^^^^^^^^^---------
|
||||
'''
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ class HTMLIgnoreRanges:
|
|||
if offset in ranges:
|
||||
...
|
||||
"""
|
||||
REGEX = re.compile(r'<!--|-->|</?\s*(?:script|style)\b[^>]*>')
|
||||
REGEX = re.compile(r'<!--|-->|</?\s*(?:script|style)\b[^>]*>', flags=re.IGNORECASE)
|
||||
|
||||
def __init__(self, html):
|
||||
self.html = html
|
||||
|
|
Loading…
Reference in a new issue