From 9d27a6f272b06f3c6004ef0f464a7642b850120c Mon Sep 17 00:00:00 2001 From: callebtc <93376500+callebtc@users.noreply.github.com> Date: Fri, 25 Nov 2022 15:20:39 +0100 Subject: [PATCH] use isinstance, not type --- lnbits/db.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lnbits/db.py b/lnbits/db.py index e67cc22ec..321b23d0a 100644 --- a/lnbits/db.py +++ b/lnbits/db.py @@ -79,7 +79,7 @@ class Connection(Compat): CLEANR = re.compile("<.*?>|&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-f]{1,6});") def cleanhtml(raw_html): - if type(raw_html) == str: + if isinstance(raw_html, str): cleantext = re.sub(CLEANR, "", raw_html) return cleantext else: