0

Hi all, I am at a stand still with trying to figure this out.

I have a textarea, i would like to check for links entered by users and replace/remove the anchor attribute from the string.

ie. change <a href='google.com'>website</a> to website its more so to validate ( i have a php side working to validate for links but am trying to get jquery to just remove it and maybe say a warning.

function textarea(){
	var message = $("#text").val();
     // How would you check the text here and remove all links typed in by the user
});

if someone might know where to start with this it would be much appreciated

Thanks,

2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by cjay175
0

Please read this example. It should be exactly what you are looking for. That's from a google search by the way...

Edited by Taywin: n/a

0

Thanks that's exactly what I was looking for. I tried searchin google but I think i was trying to specific of keywords "jquery check for links in textarea" etc.

Sometimes another view can be so helpful.

Thanks again

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.