File: fix-crash-HTMLParser.patch

package info (click to toggle)
wig 0.6-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,028 kB
  • sloc: python: 1,520; sh: 37; makefile: 5
file content (23 lines) | stat: -rw-r--r-- 697 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
From: Matheus Polkorny <mpolkorny@gmail.com>
Date: Wed, 11 Mar 2026 21:59:41 -0300
Subject: Fix crash with Python 3.13 HTMLParser
Forwarded: https://github.com/jekyc/wig/pull/44
---
 classes/request2.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/classes/request2.py b/classes/request2.py
index 44b9151..ef43ed5 100644
--- a/classes/request2.py
+++ b/classes/request2.py
@@ -10,9 +10,7 @@ from html.parser import HTMLParser
 
 class HTMLStripper(HTMLParser):
 	def __init__(self):
-		self.reset()
-		self.strict = False
-		self.convert_charrefs = True
+		super().__init__(convert_charrefs=True)
 		self.tagtext = []
 	def handle_data(self, d):
 		self.tagtext.append(d)