I swear it worked before! Until someone send my bugreport... .)
If url is valid Net::HTTP.get_response(url) returns Net::HTTPOK class which is kind of Net::HTTPSuccess but fails in test [Net::HTTPSuccess].include..
In generally I thinking about refactoring all this method, because:
Couldn't be better put here only simple regexp?
correct link test if HTTP response is kind of HTTPSuccess or HTTPRedi…
Yeah but a simple regexp doesn't say whether the page exists or not.
Maybe the feature itself is just something to get rid of? @ugisozols @robyurkowski
or change it to client side validation and check url through ajax call?
Yes client side would work 👍
Are you keen to work on it?
I would get rid of this feature because I prefer manual check of the url - it gives me more confidence that the url I'm linking to is working as expected.
Improved client side link validation with ajax page test
Fixes #1929 and #1927
Fixed by #1929