SimpleChatTC:SimpleProxy:UrlText: Avoid style blocks also
This commit is contained in:
parent
f493e1af59
commit
b46bbc542a
|
|
@ -97,11 +97,13 @@ class TextHtmlParser(html.parser.HTMLParser):
|
||||||
self.bCapture = True
|
self.bCapture = True
|
||||||
if tag == 'script':
|
if tag == 'script':
|
||||||
self.bCapture = False
|
self.bCapture = False
|
||||||
|
if tag == 'style':
|
||||||
|
self.bCapture = False
|
||||||
|
|
||||||
def handle_endtag(self, tag: str):
|
def handle_endtag(self, tag: str):
|
||||||
if tag == 'body':
|
if tag == 'body':
|
||||||
self.bBody = False
|
self.bBody = False
|
||||||
if tag == 'script':
|
if tag == 'script' or tag == 'style':
|
||||||
if self.bBody:
|
if self.bBody:
|
||||||
self.bCapture = True
|
self.bCapture = True
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue