pow-co / pow.co

https://powco.vercel.app
7 stars 7 forks source link

Markdown URLs don't go off-site #21

Closed usselman closed 1 year ago

usselman commented 1 year ago

In this post: https://pow.co/9d30eaa493c42c904987cd1c27f2f8a2d2ed5c2627c67c70f30bcf990f5757ca , I am using a markdown URL to take people to my personal website. But instead of taking you to shirish.neocities.org it takes you to pow.co/shirish.neocities.org.

powco-dev[bot] commented 1 year ago

Thank you for making this issue!

Please get it some attention by boosting it here https://powco.dev/github/pow-co/pow.co/issues/21

Bounties may be sent to this address https://whatsonchain.com/address/1NB6vjPJCzcLvJxT5hmBnqRn2wguc37fGy and will be paid to the worker who completes your issue.

powco-dev[bot] commented 1 year ago

Thank you for making this issue!

Please get it some attention by boosting it here https://powco.dev/github/pow-co/pow.co/issues/21

Bounties may be sent to this address https://whatsonchain.com/address/1NB6vjPJCzcLvJxT5hmBnqRn2wguc37fGy and will be paid to the worker who completes your issue.

derrickhorton commented 1 year ago

Oh, interesting issue! Thank you for making me aware of this. This might be something I can fix.

create-issue-branch[bot] commented 1 year ago

Branch issue-21-Markdown_URLs_don_t_go_off-site created!

derrickhorton commented 1 year ago

Following up, I noticed a discrepancy where:

A URL starting with www. goes to https://pow.co/www.<URL>

A URL starting with https:// goes to <URL>

Screenshot 2023-02-15 at 21 43 33 Screenshot 2023-02-15 at 21 43 11 Screenshot 2023-02-15 at 21 44 14 Screenshot 2023-02-15 at 21 44 24

Example video:

https://user-images.githubusercontent.com/4019818/219157740-94e29cb9-a9ef-4110-ae21-82e50ad4b5fd.mp4

usselman commented 1 year ago

That's interesting. I believe the issue may be happening here, on lines 105 through 121 of OnChainEvent.tsx

For some reason, www. gets concatenated onto your URL while https:// actually replaces it with the link.

Screen Shot 2023-02-15 at 1 49 15 PM
1aristotelis commented 1 year ago

@eddiewillers @usselman latest commit fixes this