]> git.mxchange.org Git - friendica.git/blobdiff - mod/item.php
escape_tags calls
[friendica.git] / mod / item.php
index c86ed5e2787678509e366a0b729e7dd022e45b17..c6f359cf4824bf3c3a52e19e3afba9431c7b4463 100644 (file)
@@ -36,6 +36,7 @@ use Friendica\Protocol\Email;
 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';
@@ -203,8 +204,8 @@ function item_post(App $a) {
                $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'];
@@ -235,14 +236,14 @@ function item_post(App $a) {
                        $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', '');