Skip to content
This repository has been archived by the owner on Nov 2, 2024. It is now read-only.

🐛 Unexpected behavior for outgoing links on markdown pages #1086

Open
alfredgrip opened this issue May 9, 2023 · 0 comments
Open

🐛 Unexpected behavior for outgoing links on markdown pages #1086

alfredgrip opened this issue May 9, 2023 · 0 comments
Assignees
Labels
type: bug Something isn't working

Comments

@alfredgrip
Copy link
Contributor

Short description of the bug

When linking to website outside of dsek.se with markdown, it has to be properly written. Otherwise, it will not work.
This is because when writing outgoing links in markdown, you need to include https:// for it to register as an outgoing link. If https:// is not included, markdown thinks it's an internal link.

The most simple solution would be to inform people the correct way to write markdown links. But I think this can be solved programmatically. When the editor tries to save, scan the text for links and either try get a web-request for the link, or match it to some pattern (contains https:// or something). If any fails, disallow the change and inform the one trying to edit the page that they need the correct link format.

To Reproduce

Create an outgoing link without https://, i.e. [click here to visit another website](example.com).

Expected behavior

The markdown rendered text should take you to the outgoing page, i.e. https://example.com

Actual behavior

Tries to find the page internally, i.e. on dsek.se, so the user gets taken to dsek.se/example.com

Context

Currently, on https://www.dsek.se/contact-us, The Student Well-being Committee has such a link that doesn't work. It is written as [bit.ly/kontaktatrivsel](bit.ly/kontaktatrivsel), but markdown will direct you to https://www.dsek.se/bit.ly/kontaktatrivsel which doesn't exists.

Environment (If applicable)

Everywhere

@alfredgrip alfredgrip added the type: bug Something isn't working label May 9, 2023
@github-project-automation github-project-automation bot moved this to 🆕 New in DWWW 2023 May 9, 2023
@alfredgrip alfredgrip changed the title 🐛 Unexpected behavor for outgoing links on markdown pages 🐛 Unexpected behavior for outgoing links on markdown pages May 10, 2023
@Macludde Macludde self-assigned this May 23, 2023
@Macludde Macludde moved this from 🆕 New to 🔖 Sprint in DWWW 2023 May 23, 2023
@danieladugyan danieladugyan moved this from 🔖 Sprint to 📋 Backlog in DWWW 2023 Aug 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug Something isn't working
Projects
No open projects
Status: 📋 Backlog
Development

No branches or pull requests

2 participants