I am developing a website in which user writes something in textarea. When the user clicks on submit the data is saved in the database. When I retreive the data, if the data contain a link it is not clickable. This is obviously because it is not enclosed in anchor tags.
Now I have two options:
- Put Anchor tags before saving data in database.
- Put anchor tags when data is retrieved from Database.
I have no idea how to do that. I am not using tinyMCE plugin.
If I compare result returned by database character by character then it will be also useless. I am in search of a good algorithm.