]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/html_mail_functions.php
New wrapper functions introduced, TODOs.txt updated
[mailer.git] / inc / libs / html_mail_functions.php
index a3c176691d83517535fe8fcd521cb4f4a559770b..0ca2f48b0402d0357f9cfcb221930476f9afce82 100644 (file)
@@ -56,7 +56,7 @@ function addValidHtmlTags() {
 //
 function checkHtmlTags ($html) {
        $test = stripslashes($html);
-       while (ereg('<', $test) && ereg('>', $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'])) {
@@ -74,12 +74,12 @@ 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...
@@ -97,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);
 
@@ -148,7 +148,7 @@ function insertUrlsIntoHtml ($text) {
        } // END - foreach
 
        // Replace new-lines agains <br />-s and finally compile possible own HTML tags out...
-       return compileCode(str_replace("\n", "<br />\n", $text));
+       return preCompileCode(str_replace("\n", "<br />\n", $text));
 }
 
 // Sends a HTML mail to the user