I am curious if there's a snippet in PHP/codeigniter/javascript/jquery for input that accept facebook/youtube link and validate that they are real link from them? I dont want to happen that the user inputs a malicious link in my normal input tag.
If there are no snippet available. What's the best but simple validation I can have in my inputs?