* -------------------------------------------------------------------- *
* Short description : Functions for the HTML extension *
* -------------------------------------------------------------------- *
* -------------------------------------------------------------------- *
* Short description : Functions for the HTML extension *
* -------------------------------------------------------------------- *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
$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) {
$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 - if
$pos = strpos($test, '@');
$test2 = substr($test, 0, $pos);
$pos = strpos($test, '@');
$test2 = substr($test, 0, $pos);
while ($idx < strlen($test)) {
$check = substr($test, $idx, 1);
if ((!in_array($check, $GLOBALS['valid_email_chars'])) && ($check != '@')) {
while ($idx < strlen($test)) {
$check = substr($test, $idx, 1);
if ((!in_array($check, $GLOBALS['valid_email_chars'])) && ($check != '@')) {
// Remove email from testing string (see above why...)
$test = substr($test, strlen($check));
}
// Now put all parts together
// Remove email from testing string (see above why...)
$test = substr($test, strlen($check));
}
// Now put all parts together