From 59f5e26a8b155a0cf20991be83c14ad7b58413cd Mon Sep 17 00:00:00 2001 From: Jakub Kuczys Date: Wed, 25 Dec 2024 03:27:22 +0100 Subject: [PATCH] Fix safety of ``[p]repo list`` --- redbot/cogs/downloader/downloader.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/redbot/cogs/downloader/downloader.py b/redbot/cogs/downloader/downloader.py index 9df5d8ada94..1cc35383306 100644 --- a/redbot/cogs/downloader/downloader.py +++ b/redbot/cogs/downloader/downloader.py @@ -655,7 +655,11 @@ async def _repo_list(self, ctx: commands.Context) -> None: joined += "- **{}:** {}\n - {}\n".format( repo.name, repo.short or "", - "<{}>".format(repo.url), + ( + f"<{repo.clean_url}>" + if repo.clean_url.startswith(("http://", "https://")) + else repo.clean_url + ), ) for page in pagify(joined, ["\n"], shorten_by=16):