hi,
i'm using php wordwrap for my comment box.
This is my clickable function,
function clickable_link($text)
{
$ret = ' ' . $text;
$ret = preg_replace("#(^|[\n ])([\w]+?://[\w\#$%&~/.\-;:=,?@\[\]+]*)#is", "\\1<a class=\"hrefLink\" href=\"\\2\" target=\"_blank\">\\2</a>", $ret);
$ret = preg_replace("#(^|[\n ])((www|ftp)\.[\w\#$%&~/.\-;:=,?@\[\]+]*)#is", "\\1<a class=\"hrefLink\" href=\"http://\\2\" target=\"_blank\">\\2</a>", $ret);
$ret = preg_replace("#(^|[\n ])([a-z0-9&\-_.]+?)@([\w\-]+\.([\w\-\.]+\.)*[\w]+)#i", "\\1<a href=\"mailto:\\2@\\3\">\\2@\\3</a>", $ret);
$ret = substr($ret, 1);
return $ret;
}
and this is my wordwrap for comment
$comment = clickable_link($comment);
$comment = wordwrap($comment, 25, "\n", false);
so, once the word limit for 25 is reached, my comment box break my link
http://www.websitetitle.com/showthread.php?t=2000
link become like this
http://www.websitetitle.com/showthread.php?
<br>
t=2000
The link is broken. so is it possible to fix the link or any other workaround?
Thank you