SimpleChatTC:SimpleProxy:UrlText: Avoid style blocks also

This commit is contained in:
hanishkvc 2025-10-17 01:50:26 +05:30
parent f493e1af59
commit b46bbc542a
1 changed files with 3 additions and 1 deletions

View File

@ -97,11 +97,13 @@ class TextHtmlParser(html.parser.HTMLParser):
self.bCapture = True
if tag == 'script':
self.bCapture = False
if tag == 'style':
self.bCapture = False
def handle_endtag(self, tag: str):
if tag == 'body':
self.bBody = False
if tag == 'script':
if tag == 'script' or tag == 'style':
if self.bBody:
self.bCapture = True