From b6ca8f7d2cf59a615b0918cd77382d8cd8846288 Mon Sep 17 00:00:00 2001 From: jack1142 <6032823+jack1142@users.noreply.github.com> Date: Sat, 4 Jan 2020 04:44:33 +0100 Subject: [PATCH] [Core] Escape markdown in python executable path in ``[p]debuginfo`` command. (#3254) * Update core_commands.py * Create 3254.misc.rst --- changelog.d/3254.misc.rst | 1 + redbot/core/core_commands.py | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 changelog.d/3254.misc.rst diff --git a/changelog.d/3254.misc.rst b/changelog.d/3254.misc.rst new file mode 100644 index 000000000..8bb0b6b50 --- /dev/null +++ b/changelog.d/3254.misc.rst @@ -0,0 +1 @@ +Escape markdown in python executable path in ``[p]debuginfo`` command. diff --git a/redbot/core/core_commands.py b/redbot/core/core_commands.py index 66fdcbc6b..82476b7ec 100644 --- a/redbot/core/core_commands.py +++ b/redbot/core/core_commands.py @@ -1592,7 +1592,11 @@ class Core(commands.Cog, CoreLogic): e.add_field(name="System arch", value=platform.machine(), inline=True) e.add_field(name="User", value=user_who_ran, inline=True) e.add_field(name="OS version", value=osver, inline=False) - e.add_field(name="Python executable", value=sys.executable, inline=False) + e.add_field( + name="Python executable", + value=escape(sys.executable, formatting=True), + inline=False, + ) await ctx.send(embed=e) else: info = (