Skip to content

Commit

Permalink
Fix subscribe deeplink
Browse files Browse the repository at this point in the history
A colon inside the protocol is not a valid url.

The website tried to open `antennapod-subscribe://https://abc`
but ended up opening `antennapod-subscribe://https//abc`, which caused
an error.

Now the website strips the http(s) and gives `antennapod-subscribe://abc`
and the app adds the protocol.
  • Loading branch information
ByteHamster committed Dec 3, 2024
1 parent 2053300 commit aa29c8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deeplink/subscribe/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ <h2 id="podcastTitle">{% t generic.subscribe %}</h2>
const url = urlParams.get("url");
urlTextBox.textContent = url;
subscribeButton.onclick = () => {
window.open("antennapod-subscribe://" + url);
window.open("antennapod-subscribe://" + url.replace(/^https?:\/\//g, ''));
};
}
</script>

0 comments on commit aa29c8a

Please sign in to comment.