From 3664451b303442b0dfe93e59cba370332a91e86e Mon Sep 17 00:00:00 2001 From: Sakimori Date: Sun, 27 Dec 2020 18:07:26 -0500 Subject: [PATCH] applied the regex replacement to the search string too --- database.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database.py b/database.py index 2595158..e8b1ca2 100644 --- a/database.py +++ b/database.py @@ -238,7 +238,7 @@ def search_teams(search_string): conn = create_connection() if conn is not None: c = conn.cursor() - c.execute("SELECT team_json_string FROM teams WHERE name LIKE ?",(f"%{search_string}%",)) + c.execute("SELECT team_json_string FROM teams WHERE name LIKE ?",(re.sub('[^A-Za-z0-9 %]+', '', f"%{search_string}%"),)) team_json_strings = c.fetchall() conn.close() return team_json_strings