From 5627a9065210b7d90021cf0f81959e61c4ff6291 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0tefan=20Baebler?= Date: Fri, 27 Jun 2025 18:52:43 +0200 Subject: [PATCH] dev-cmd/bump-formula-pr: release notes as proper html link The release notes link is not rendered as a proper hyperlink, this fixes it. Few examples of PRs with unclickable links: * https://github.com/Homebrew/homebrew-core/pull/228256 * https://github.com/Homebrew/homebrew-core/pull/228263 * https://github.com/Homebrew/homebrew-core/pull/228267 --- Library/Homebrew/dev-cmd/bump-formula-pr.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/dev-cmd/bump-formula-pr.rb b/Library/Homebrew/dev-cmd/bump-formula-pr.rb index a68aa0829e..1a780ea343 100644 --- a/Library/Homebrew/dev-cmd/bump-formula-pr.rb +++ b/Library/Homebrew/dev-cmd/bump-formula-pr.rb @@ -404,11 +404,14 @@ module Homebrew # maximum length of PR body is 65,536 characters so let's truncate release notes to half of that. body = Formatter.truncate(github_release_data["body"], max: 32_768) + # Ensure the URL is properly HTML encoded to handle any quotes or other special characters + html_url = CGI.escapeHTML(github_release_data["html_url"]) + formula_pr_message += <<~XML
#{pre}release notes
#{body}
-

View the full release notes at #{github_release_data["html_url"]}.

+

View the full release notes at #{html_url}.

XML end