use Friendica\Module\Login;
use Friendica\Network\Probe;
use Friendica\Util\DateTimeFormat;
+use Friendica\Util\Strings;
use Friendica\Util\Temporal;
function profiles_init(App $a) {
$is_default = (($orig[0]['is-default']) ? 1 : 0);
- $profile_name = notags(trim($_POST['profile_name']));
+ $profile_name = Strings::removeTags(trim($_POST['profile_name']));
if (! strlen($profile_name)) {
notice(L10n::t('Profile Name is required.') . EOL);
return;
}
}
- $name = notags(trim($_POST['name']));
+ $name = Strings::removeTags(trim($_POST['name']));
if (! strlen($name)) {
$name = '[No Name]';
$namechanged = true;
}
- $pdesc = notags(trim($_POST['pdesc']));
- $gender = notags(trim($_POST['gender']));
- $address = notags(trim($_POST['address']));
- $locality = notags(trim($_POST['locality']));
- $region = notags(trim($_POST['region']));
- $postal_code = notags(trim($_POST['postal_code']));
- $country_name = notags(trim($_POST['country_name']));
- $pub_keywords = profile_clean_keywords(notags(trim($_POST['pub_keywords'])));
- $prv_keywords = profile_clean_keywords(notags(trim($_POST['prv_keywords'])));
- $marital = notags(trim($_POST['marital']));
- $howlong = notags(trim($_POST['howlong']));
+ $pdesc = Strings::removeTags(trim($_POST['pdesc']));
+ $gender = Strings::removeTags(trim($_POST['gender']));
+ $address = Strings::removeTags(trim($_POST['address']));
+ $locality = Strings::removeTags(trim($_POST['locality']));
+ $region = Strings::removeTags(trim($_POST['region']));
+ $postal_code = Strings::removeTags(trim($_POST['postal_code']));
+ $country_name = Strings::removeTags(trim($_POST['country_name']));
+ $pub_keywords = profile_clean_keywords(Strings::removeTags(trim($_POST['pub_keywords'])));
+ $prv_keywords = profile_clean_keywords(Strings::removeTags(trim($_POST['prv_keywords'])));
+ $marital = Strings::removeTags(trim($_POST['marital']));
+ $howlong = Strings::removeTags(trim($_POST['howlong']));
- $with = ((x($_POST,'with')) ? notags(trim($_POST['with'])) : '');
+ $with = ((x($_POST,'with')) ? Strings::removeTags(trim($_POST['with'])) : '');
if (! strlen($howlong)) {
$howlong = DBA::NULL_DATETIME;
}
/// @TODO Not flexible enough for later expansion, let's have more OOP here
- $sexual = notags(trim($_POST['sexual']));
- $xmpp = notags(trim($_POST['xmpp']));
- $homepage = notags(trim($_POST['homepage']));
+ $sexual = Strings::removeTags(trim($_POST['sexual']));
+ $xmpp = Strings::removeTags(trim($_POST['xmpp']));
+ $homepage = Strings::removeTags(trim($_POST['homepage']));
if ((strpos($homepage, 'http') !== 0) && (strlen($homepage))) {
// neither http nor https in URL, add them
$homepage = 'http://'.$homepage;
}
- $hometown = notags(trim($_POST['hometown']));
- $politic = notags(trim($_POST['politic']));
- $religion = notags(trim($_POST['religion']));
+ $hometown = Strings::removeTags(trim($_POST['hometown']));
+ $politic = Strings::removeTags(trim($_POST['politic']));
+ $religion = Strings::removeTags(trim($_POST['religion']));
$likes = escape_tags(trim($_POST['likes']));
$dislikes = escape_tags(trim($_POST['dislikes']));