On 10/13/07, Hemanth <mvhemanth@xxxxxxxxx> wrote: > > Hi, > I am trying to display as links the url's posted in the forms > <textarea> at my site valueads_dot_biz > > I am removing all codes and special chars when they post to avoid any > injection > > but when i retrive back form the database and display > I want to find the url's in the text and display as clickable links. > > I found many examples in the php manual and on the web.. > > but still having hiccups > > I'd like some suggestions form you people. how are you extracting the links from the text people submit? id recommend you search the web for some free regex that matches a url and use that to extract the links. or write your own regex :) also, how do people get to add links? on gmail and many other systems there is a purpose built button that allows you to transform highlighted text into a link. if you had something like that you could handle those links specially. i might append a class attribute of those anchor tags. then when the form is submitted, grab all those anchor tags and place special tags that your application knows about around them. that way when you grab the text back out of the database, you can easily find those links and strip the special delimiters off. -nathan