presseddigital / linkit

Linkit Plugin for Craft 4
Other
28 stars 18 forks source link

URLs aren't validated correctly #76

Open darylknight opened 4 years ago

darylknight commented 4 years ago

When you use a URL field in Craft, the client has to type the protocol (https://). When URL is selected in LinkIt, it looks like this doesn't happen. I've just done a broken link report on a client site, and one of the fields is this:

image

Which means the front end code is outputting https://theclientwebsite.com/www.duttongoldfield.com

I tried putting random text in there, and it DID get validated and wouldn't let me save it. Then I changed it back to www.duttongoldfield.com, and LinkIt automatically saved the URL as http://www.duttongoldfield.com.

What would cause it to automatically fix the URL when I enter it, but not when the client does? I think it'd be more reliable if it just failed a URL that didn't include a protocol.