From f01f9789fc239290a43fbf83f09536d49b32131a Mon Sep 17 00:00:00 2001 From: James Lu Date: Tue, 31 Dec 2019 23:08:00 -0800 Subject: [PATCH] MCInfo: strip nbsp from crafting item names --- MCInfo/plugin.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/MCInfo/plugin.py b/MCInfo/plugin.py index fc86721..33e126e 100644 --- a/MCInfo/plugin.py +++ b/MCInfo/plugin.py @@ -53,7 +53,10 @@ from bs4 import BeautifulSoup mcwiki_url = 'http://minecraft.gamepedia.com' def format_text(text): - return utils.str.normalizeWhitespace(text).strip() + text = text.replace('\xa0', '') + text = utils.str.normalizeWhitespace(text) + text = text.strip() + return text class MCInfo(callbacks.Plugin): """Fetches crafting recipes and other interesting information from the Minecraft Wiki."""