From f0cd65a2e7d1081934053b8a111a602cc6d1cf5d Mon Sep 17 00:00:00 2001 From: Patryk Michalik Date: Sun, 6 Jun 2021 09:13:59 +0200 Subject: [PATCH] =?UTF-8?q?=E2=80=98send=5Fchangelog.py=E2=80=99:=20Escape?= =?UTF-8?q?=20ampersands?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- send_changelog.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/send_changelog.py b/send_changelog.py index 7c8a2f46d1..32be462981 100644 --- a/send_changelog.py +++ b/send_changelog.py @@ -15,7 +15,7 @@ commits = list(repository.iter_commits(commits_range)) message = f'''**🔨 [{len(commits)} new {'commit' if len(commits) == 1 else 'commits'}](https://github.com/{github_repo}/compare/{commits_range}) to `lawnchair:{branch}`:**\n''' for commit in commits: - commit_message = commit.message.split('\n')[0].replace('_', '\\_').replace('#', '\\#') + commit_message = commit.message.split('\n')[0].replace('_', '\\_').replace('#', '\\#').replace('&', '\\&') message += f'''\n• [{repository.git.rev_parse(commit.hexsha, short=7)}](https://github.com/LawnchairLauncher/lawnchair/commit/{commit.hexsha}): {commit_message}''' requests.get(f'''https://api.telegram.org/bot{telegram_ci_bot_token}/sendMessage?chat_id={telegram_ci_channel_id}&parse_mode=Markdown&text={message}&disable_web_page_preview=true''')