use Friendica\Util\DateTimeFormat;
use Friendica\Util\Emailer;
use Friendica\Util\Security;
+use Friendica\Util\Strings;
require_once 'include/enotify.php';
require_once 'include/text.php';
$objecttype = $orig_post['object-type'];
$app = $orig_post['app'];
$categories = $orig_post['file'];
- $title = notags(trim($_REQUEST['title']));
- $body = escape_tags(trim($_REQUEST['body']));
+ $title = Strings::removeTags(trim($_REQUEST['title']));
+ $body = Strings::escapeTags(trim($_REQUEST['body']));
$private = $orig_post['private'];
$pubmail_enabled = $orig_post['pubmail'];
$network = $orig_post['network'];
$str_contact_deny = perms2str(defaults($_REQUEST, 'contact_deny', ''));
}
- $title = notags(trim(defaults($_REQUEST, 'title' , '')));
- $location = notags(trim(defaults($_REQUEST, 'location', '')));
- $coord = notags(trim(defaults($_REQUEST, 'coord' , '')));
- $verb = notags(trim(defaults($_REQUEST, 'verb' , '')));
- $emailcc = notags(trim(defaults($_REQUEST, 'emailcc' , '')));
- $body = escape_tags(trim(defaults($_REQUEST, 'body' , '')));
- $network = notags(trim(defaults($_REQUEST, 'network' , Protocol::DFRN)));
- $guid = System::createUUID();
+ $title = Strings::removeTags(trim(defaults($_REQUEST, 'title' , '')));
+ $location = Strings::removeTags(trim(defaults($_REQUEST, 'location', '')));
+ $coord = Strings::removeTags(trim(defaults($_REQUEST, 'coord' , '')));
+ $verb = Strings::removeTags(trim(defaults($_REQUEST, 'verb' , '')));
+ $emailcc = Strings::removeTags(trim(defaults($_REQUEST, 'emailcc' , '')));
+ $body = Strings::escapeTags(trim(defaults($_REQUEST, 'body' , '')));
+ $network = Strings::removeTags(trim(defaults($_REQUEST, 'network' , Protocol::DFRN)));
+ $guid = System::createUUID();
$postopts = defaults($_REQUEST, 'postopts', '');
killme();
}
- if ($orig_post) {
-
+ if ($orig_post) {
// Fill the cache field
// This could be done in Item::update as well - but we have to check for the existance of some fields.
- put_item_in_cache($datarray);
+ Item::putInCache($datarray);
$fields = [
'title' => $datarray['title'],
$subject = Email::encodeHeader('[Friendica]' . ' ' . L10n::t('%s posted an update.', $a->user['username']), 'UTF-8');
}
$link = '<a href="' . System::baseUrl() . '/profile/' . $a->user['nickname'] . '"><img src="' . $author['thumb'] . '" alt="' . $a->user['username'] . '" /></a><br /><br />';
- $html = prepare_body($datarray);
+ $html = Item::prepareBody($datarray);
$message = '<html><body>' . $link . $html . $disclaimer . '</body></html>';
$params = [
'fromName' => $a->user['username'],