New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug 1798622: oc adm release info: escape PR titles which might contain html #281
Conversation
pkg/cli/admin/release/git.go
Outdated
@@ -245,6 +246,13 @@ func mergeLogForRepo(g gitInterface, repo string, from, to string) ([]MergeCommi | |||
mergeCommit.Subject = "Merge" | |||
} | |||
|
|||
// Clean up the string so backticks in pr titles don't get formatted | |||
// in the markdown output | |||
mergeCommit.Subject = strings.Replace(mergeCommit.Subject, "`", "\\`", -1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we want that? I use this all the time:
Bug 30498: Improve output of
oc status
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or are you concerned about unbalanced backticks?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe when I found this a long time ago I found unbalanced backticks. But right now i'd be happy just with the html escape. So I dropped this line.
for example openshift/console#3255 breaks all subsequent PRs in the release viewer |
Some PRs include things like <title> which break the release viewer We also escape any instance of ` to prevent odd formatting
6f4d528
to
2605613
Compare
/lgtm |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest |
/retest Please review the full test history for this PR and help us cut down flakes. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: eparis, smarterclayton, soltysh The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@eparis: This pull request references Bugzilla bug 1798622, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/retest Please review the full test history for this PR and help us cut down flakes. |
2 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest |
/retest Please review the full test history for this PR and help us cut down flakes. |
@eparis: All pull requests linked via external trackers have merged. Bugzilla bug 1798622 has been moved to the MODIFIED state. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Some PRs include things like <title> which break the release viewer
We also escape any instance of ` to prevent odd formatting