Skip to content

Commit fe4f472

Browse files
Merge pull request #20187 from Homebrew/github-release-notes-link
dev-cmd/bump-formula-pr: release notes as proper html link
2 parents 01c8e42 + 5627a90 commit fe4f472

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

Library/Homebrew/dev-cmd/bump-formula-pr.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,11 +404,14 @@ def run
404404
# maximum length of PR body is 65,536 characters so let's truncate release notes to half of that.
405405
body = Formatter.truncate(github_release_data["body"], max: 32_768)
406406

407+
# Ensure the URL is properly HTML encoded to handle any quotes or other special characters
408+
html_url = CGI.escapeHTML(github_release_data["html_url"])
409+
407410
formula_pr_message += <<~XML
408411
<details>
409412
<summary>#{pre}release notes</summary>
410413
<pre>#{body}</pre>
411-
<p>View the full release notes at #{github_release_data["html_url"]}.</p>
414+
<p>View the full release notes at <a href="#{html_url}">#{html_url}</a>.</p>
412415
</details>
413416
XML
414417
end

0 commit comments

Comments
 (0)