Skip to content
This repository has been archived by the owner on Jul 13, 2022. It is now read-only.

Require that external URLs are prefixed with http or https #35

Closed
hartsick opened this issue Jun 21, 2020 · 4 comments · Fixed by #37
Closed

Require that external URLs are prefixed with http or https #35

hartsick opened this issue Jun 21, 2020 · 4 comments · Fixed by #37
Assignees
Labels
bug Something isn't working

Comments

@hartsick
Copy link
Collaborator

hartsick commented Jun 21, 2020

Right now if we enter something like www.google.com into either our agenda_link or video_link fields, Rails treats those as relative paths and can't find the correct page.

To address this, we could either validate that those URLs start with http or https when entered, or just prefix the provided URLs with them before saving to the database.

[related to #29]

@hartsick hartsick added the bug Something isn't working label Jun 21, 2020
@disambiguator disambiguator self-assigned this Jun 21, 2020
@disambiguator
Copy link
Collaborator

oh how dumb

@hartsick
Copy link
Collaborator Author

hartsick commented Jun 21, 2020 via email

disambiguator added a commit that referenced this issue Jun 21, 2020
@disambiguator
Copy link
Collaborator

@hartsick Check out the PR...this feels too easy, any edge cases I'm missing?

@hartsick
Copy link
Collaborator Author

hartsick commented Jun 21, 2020 via email

hartsick pushed a commit that referenced this issue Jun 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants