X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Flibs%2Fnewsletter_functions.php;h=2c77e3a802cb06159ceccc11ae9673143c4549ab;hb=fe1e1d3b8291b1ca991e3d2e639cb28097c53d74;hp=16a28db280747a41ebc2f4f1f259137342e97143;hpb=3afdce4fe00b4af570122ce7b8158ced44aec7d3;p=mailer.git diff --git a/inc/libs/newsletter_functions.php b/inc/libs/newsletter_functions.php index 16a28db280..2c77e3a802 100644 --- a/inc/libs/newsletter_functions.php +++ b/inc/libs/newsletter_functions.php @@ -56,14 +56,14 @@ function NL_ADD_VALID_TAGS () { // function NL_CHECK_TAGS ($html) { $test = stripslashes($html); - while (ereg("<", $test) && ereg(">", $test)) { - $check = strtolower(substr($test, strpos($test, "<") + 1, strpos($test, ">") - strpos($test, "<") - 1)); + while (ereg('<', $test) && ereg('>', $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 ""; } - $test = substr($test, strpos($test, ">") + 1); + $test = substr($test, strpos($test, '>') + 1); } // Return tested code return $html; @@ -97,8 +97,8 @@ function NL_INSERT_URLS ($text) { // ... what will the email address be out the @... ;-) $PARTS = array(); - while (ereg("@", $test)) { - $pos = strpos($test, "@"); + while (ereg('@', $test)) { + $pos = strpos($test, '@'); $test2 = substr($test, 0, $pos); // First check backwards @@ -123,7 +123,7 @@ function NL_INSERT_URLS ($text) { $idx = 0; while ($idx < strlen($test)) { $check = substr($test, $idx, 1); - if ((!in_array($check, $GLOBALS['valid_email_chars'])) && ($check != "@")) { + if ((!in_array($check, $GLOBALS['valid_email_chars'])) && ($check != '@')) { // Char found so end here again break; } @@ -136,7 +136,7 @@ function NL_INSERT_URLS ($text) { } // 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));