From 15bf5c5e1f80751ad2564f7a65eb7f0ea9badedc Mon Sep 17 00:00:00 2001 From: ToxicFrazzles Date: Mon, 13 Aug 2018 03:00:54 +0100 Subject: [PATCH] [General] fixed [p]lmgtfy when search contains '+' (#1868) A plus in an equation is interpreted as a space by https://lmgtfy.com which breaks the equation. Fixed by escaping plus characters in the search terms. --- cogs/general.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cogs/general.py b/cogs/general.py index 42a42dc6b..974e908cb 100644 --- a/cogs/general.py +++ b/cogs/general.py @@ -154,7 +154,7 @@ class General: @commands.command() async def lmgtfy(self, *, search_terms : str): """Creates a lmgtfy link""" - search_terms = escape_mass_mentions(search_terms.replace(" ", "+")) + search_terms = escape_mass_mentions(search_terms.replace("+","%2B").replace(" ", "+")) await self.bot.say("https://lmgtfy.com/?q={}".format(search_terms)) @commands.command(no_pm=True, hidden=True)