X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Flibs%2Fhtml_mail_functions.php;h=8630b681283b234c2360fbad7e3ad5608b00d92c;hb=40a3f53ad48b0205d39498ab28d526b4fd30a0ec;hp=6b951f8a00d52f07057f44527b5286727acdbf28;hpb=f2736bc6457140146890877d992be862a78b259f;p=mailer.git diff --git a/inc/libs/html_mail_functions.php b/inc/libs/html_mail_functions.php index 6b951f8a00..8630b68128 100644 --- a/inc/libs/html_mail_functions.php +++ b/inc/libs/html_mail_functions.php @@ -1,7 +1,7 @@ ', $test)) { + while (isInString('<', $test) && isInString('>', $test)) { $check = strtolower(substr($test, strpos($test, '<') + 1, strpos($test, '>') - strpos($test, '<') - 1)); $check = str_replace('/', '', $check); if (!in_array($check, $GLOBALS['html_tags'])) { // Invalid tag found! - return ""; + return ''; } $test = substr($test, strpos($test, '>') + 1); } @@ -73,16 +74,16 @@ function insertUrlsIntoHtml ($text) { $test = $text; // First replace URLs... - while (ereg('http://', $test)) { + while (isInString('http://', $test)) { $check = substr($test, strpos($test, 'http://')); $check2 = $check; // See ext-html.php if you want to add more URL ends... foreach ($GLOBALS['url_ends'] as $end) { - if (ereg($end, $check)) $check = substr($check, 0, strpos($check, $end)); + if (isInString($end, $check)) $check = substr($check, 0, strpos($check, $end)); } // END - foreach // Now replace the URL against anchor container and pray... - $text = substr($text, 0, strpos($text, $check2))."".$check."".substr($text, strpos($text, $check2) + strlen($check)); + $text = substr($text, 0, strpos($text, $check2)) . '' . $check . '' . substr($text, strpos($text, $check2) + strlen($check)); // Finally remove the url from testing string (or we have a loop and maybe server overload!) $test = substr($test, strpos($test, $check) + strlen($check)); @@ -96,7 +97,7 @@ function insertUrlsIntoHtml ($text) { // ... what will the email address be out the @... ;-) $PARTS = array(); - while (ereg('@', $test)) { + while (isInString('@', $test)) { $pos = strpos($test, '@'); $test2 = substr($test, 0, $pos); @@ -118,7 +119,7 @@ function insertUrlsIntoHtml ($text) { } // END - if // And now go forward... - $idx = 0; + $idx = '0'; while ($idx < strlen($test)) { $check = substr($test, $idx, 1); if ((!in_array($check, $GLOBALS['valid_email_chars'])) && ($check != '@')) { @@ -134,7 +135,7 @@ function insertUrlsIntoHtml ($text) { } // END - if // Now replace the email against anchor with mailto and pray... - $PARTS[] = $check2 . "" . $check . ""; + $PARTS[] = $check2 . '' . $check . ''; // Remove email from testing string (see above why...) $test = substr($test, strlen($check));