/ Published in: PHP
solving unwrapped link in auto_link() function
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
//1. comment these lines in text_helper.php { break; } //2. find this script in url_helper.php, $matches['1'][$i].'<a href="http'. $matches['4'][$i].'://'. $matches['5'][$i]. $matches['6'][$i].'"'.$pop.'>http'. $matches['4'][$i].'://'. $matches['5'][$i]. $matches['6'][$i].'</a>'. $period, $str); //and replace with this, $matches['1'][$i].'<a {unwrap} href="http'. $matches['4'][$i].'://'. $matches['5'][$i]. $matches['6'][$i].'" {/unwrap} '.$pop.'>http'. $matches['4'][$i].'://'. $matches['5'][$i]. $matches['6'][$i].'</a>'. $period, $str); //3. then use with word_wrap() from text_helper.php echo word_wrap(auto_link($string));