Validate URLs before at least displaying them, better before storing

Description

Currently it is possible to enter something like "www.phpconference.nl" as URL to an event which results in a relative link on web1 to "http://joind.in/event/view/www.phpconference.nl" and to "https://m.joind.in/event/www.phpconference.nl" in web2.

So a validation whether any entered URL is actually a "real" URL (or can be made into one) would be great!

Activity

Show:

Shaun Morrow September 9, 2015 at 7:11 PM

Please can someone do a code review for me on this?

https://github.com/joindin/joindin-web2/compare/master...shaunmza:JOINDIN-575?expand=1

I think thats the right link, let me know if its not.

Code works, but it seems to not update the events url 'href' at all, but I think that was a pre-existing issue. I will test and confirm this when I have a bit more time.
Use a new event for testing.

Shaun Morrow August 27, 2015 at 7:43 PM

(21:39:01) heiglandreas: on displaying: no http:// => assume http://

(21:40:55) heiglandreas: on editing: if no /^https?:\/\// check for the website and follow redirects until the last redirect and then use that value as URL

Details

Assignee

Reporter

Labels

Components

Priority

Created May 19, 2015 at 3:08 PM
Updated November 17, 2015 at 9:27 PM