Skip to content

Commit

Permalink
Fix double quoted img alt text for the "Add to Slack" button (#1170)
Browse files Browse the repository at this point in the history
  • Loading branch information
toofishes authored Sep 28, 2024
1 parent 35842a5 commit 56d5ca3
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion slack_bolt/oauth/internals.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def _build_default_install_page_html(url: str) -> str:
</head>
<body>
<h2>Slack App Installation</h2>
<p><a href="{html.escape(url)}"><img alt=""Add to Slack"" height="40" width="139" src="https://platform.slack-edge.com/img/add_to_slack.png" srcset="https://platform.slack-edge.com/img/add_to_slack.png 1x, https://platform.slack-edge.com/img/[email protected] 2x" /></a></p>
<p><a href="{html.escape(url)}"><img alt="Add to Slack" height="40" width="139" src="https://platform.slack-edge.com/img/add_to_slack.png" srcset="https://platform.slack-edge.com/img/add_to_slack.png 1x, https://platform.slack-edge.com/img/[email protected] 2x" /></a></p>
</body>
</html>
""" # noqa: E501
Expand Down
2 changes: 1 addition & 1 deletion tests/adapter_tests_async/test_async_falcon.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,5 +201,5 @@ def test_oauth(self):
response = client.simulate_get("/slack/install")
assert response.status_code == 200
assert response.headers.get("content-type") == "text/html; charset=utf-8"
assert response.headers.get("content-length") == "609"
assert response.headers.get("content-length") == "607"
assert "https://slack.com/oauth/v2/authorize?state=" in response.text
2 changes: 1 addition & 1 deletion tests/adapter_tests_async/test_async_fastapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ async def endpoint(req: Request):
response = client.get("/slack/install", allow_redirects=False)
assert response.status_code == 200
assert response.headers.get("content-type") == "text/html; charset=utf-8"
assert response.headers.get("content-length") == "609"
assert response.headers.get("content-length") == "607"
assert "https://slack.com/oauth/v2/authorize?state=" in response.text

def test_custom_props(self):
Expand Down
2 changes: 1 addition & 1 deletion tests/adapter_tests_async/test_async_sanic.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,6 @@ async def endpoint(req: Request):

# NOTE: Although sanic-testing 0.6 does not have this value,
# Sanic apps properly generate the content-length header
# assert response.headers.get("content-length") == "609"
# assert response.headers.get("content-length") == "607"

assert "https://slack.com/oauth/v2/authorize?state=" in response.text
2 changes: 1 addition & 1 deletion tests/adapter_tests_async/test_async_starlette.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,5 +219,5 @@ async def endpoint(req: Request):
response = client.get("/slack/install", allow_redirects=False)
assert response.status_code == 200
assert response.headers.get("content-type") == "text/html; charset=utf-8"
assert response.headers.get("content-length") == "609"
assert response.headers.get("content-length") == "607"
assert "https://slack.com/oauth/v2/authorize?state=" in response.text

0 comments on commit 56d5ca3

Please sign in to comment.