From 824baa4f2a0aef1269da387e053e8db201b136b2 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 02a0e26c5..bd42272dc 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: