fix: clean html tag stripping regex
This commit is contained in:
@@ -18,7 +18,7 @@ logger = logging.getLogger(__name__)
|
|||||||
def _clean_html(raw_html: str) -> str:
|
def _clean_html(raw_html: str) -> str:
|
||||||
if not raw_html:
|
if not raw_html:
|
||||||
return ""
|
return ""
|
||||||
text = re.sub(r'<[^>]+>', ' ', raw_html)
|
text = re.sub(r'<[^>]+>', '', raw_html)
|
||||||
text = html.unescape(text)
|
text = html.unescape(text)
|
||||||
return re.sub(r'\s+', ' ', text).strip()
|
return re.sub(r'\s+', ' ', text).strip()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user