Hi,
I have a blog which people often include a link in their comment.
Can anyone point me to a script or demonstrate how I can automatically
surround the text links with an anchor when the page is rendered? As
an example, here is a typical comment:
Hi! Great pics - have you seen this one? http://warehouse.carlh.com/comic/comic_062.php
....but I want the html rendered to be this:
Hi! Great pics - have you seen this one? <a href="http://
warehouse.carlh .com/comic/comic_062.php">http://warehouse.carlh.com/
comic/comic_062.php</a>
I should also point out I only want this to happen in the comments
area, which is contained in a div called 'comments'. Either that, or
the script will need to ignore existing anchors (like in the original
article etc)
Thanks in advance.
I have a blog which people often include a link in their comment.
Can anyone point me to a script or demonstrate how I can automatically
surround the text links with an anchor when the page is rendered? As
an example, here is a typical comment:
Hi! Great pics - have you seen this one? http://warehouse.carlh.com/comic/comic_062.php
....but I want the html rendered to be this:
Hi! Great pics - have you seen this one? <a href="http://
warehouse.carlh .com/comic/comic_062.php">http://warehouse.carlh.com/
comic/comic_062.php</a>
I should also point out I only want this to happen in the comments
area, which is contained in a div called 'comments'. Either that, or
the script will need to ignore existing anchors (like in the original
article etc)
Thanks in advance.
Comment