Skip to content

Commit

Permalink
[EWS] Remove extra space from GitHub PR description links
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=241522
<rdar://problem/94842283>

Reviewed by Ryan Haddad.

* Tools/CISupport/ews-build/steps.py:
(UpdatePullRequest): Port changes from 250718@main to EWS.
(UpdatePullRequest.escape_html):
* Tools/CISupport/ews-build/steps_unittest.py:

Canonical link: https://commits.webkit.org/251472@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@295467 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
JonWBedard committed Jun 10, 2022
1 parent d4d7bb7 commit 6616e77
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Tools/CISupport/ews-build/steps.py
Expand Up @@ -5111,7 +5111,7 @@ class UpdatePullRequest(shell.ShellCommand, GitHubMixin, AddToLogMixin):
ESCAPE_TABLE = {
'"': '&quot;',
"'": '&apos;',
'>': ' &gt;',
'>': '&gt;',
'<': '&lt;',
'&': '&amp;',
}
Expand All @@ -5126,7 +5126,7 @@ class UpdatePullRequest(shell.ShellCommand, GitHubMixin, AddToLogMixin):
@classmethod
def escape_html(cls, message):
message = ''.join(cls.ESCAPE_TABLE.get(c, c) for c in message)
return re.sub(r'(https?://[^\s<>,:;]+)', r'<a href="\1">\1</a>', message)
return re.sub(r'(https?://[^\s<>,:;]+?)(?=[\s<>,:;]|(&gt))', r'<a href="\1">\1</a>', message)

def __init__(self, **kwargs):
super(UpdatePullRequest, self).__init__(logEnviron=False, timeout=300, **kwargs)
Expand Down
2 changes: 1 addition & 1 deletion Tools/CISupport/ews-build/steps_unittest.py
Expand Up @@ -6317,7 +6317,7 @@ def update_pr(x, pr_number, title, description, base=None, head=None, repository
<pre>
[Merge-Queue] Add http credential helper
<a href="https://bugs.webkit.org/show_bug.cgi?id=238553">https://bugs.webkit.org/show_bug.cgi?id=238553</a>
&lt;rdar://problem/91044821 &gt;
&lt;rdar://problem/91044821&gt;
Reviewed by NOBODY (OOPS!).
Expand Down

0 comments on commit 6616e77

Please sign in to comment.