Code: Select all
<a title="SAGE ..." href="http://www.sage-tests.de/" target="_blank">SAGE test</a>Code: Select all
function highlight_no_links($string = '')
{
foreach ($string as $str) {
if ('href=' == substr($str, 0, 5) || 'src=' == substr($str, 0, 4)) {
return $str;
} elseif ('' == $str) {
return '';
} elseif ((strstr($str, 'title="')) OR
(strstr($str, 'title= "')) OR
(strstr($str, 'title ="') OR
(strstr($str, 'title = "')))) {
return $str;
} else {
return '<span class="highlight">'.$str.'</span>';
}
}
}