aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-06-22 16:09:02 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-06-22 16:09:02 -0700
commit9879cf3c6ca0652e9dc5c69824f6ab655c484c28 (patch)
treea621a88b80735551e19f3e831af10166cbd87e43 /include/items.php
parent0d8fcbe48dd92f37336dbb1bb86e609e8c86c488 (diff)
downloadvolse-hubzilla-9879cf3c6ca0652e9dc5c69824f6ab655c484c28.tar.gz
volse-hubzilla-9879cf3c6ca0652e9dc5c69824f6ab655c484c28.tar.bz2
volse-hubzilla-9879cf3c6ca0652e9dc5c69824f6ab655c484c28.zip
ensure we always sign a trimmed item body.
Diffstat (limited to 'include/items.php')
-rwxr-xr-xinclude/items.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/items.php b/include/items.php
index eb4ad1ead..229512ead 100755
--- a/include/items.php
+++ b/include/items.php
@@ -423,7 +423,7 @@ function post_activity_item($arr) {
if(array_key_exists('item_private',$arr) && $arr['item_private']) {
- $arr['body'] = z_input_filter($arr['uid'],$arr['body'],$arr['mimetype']);
+ $arr['body'] = trim(z_input_filter($arr['uid'],$arr['body'],$arr['mimetype']));
if($channel) {
if($channel['channel_hash'] === $arr['author_xchan']) {
@@ -2064,7 +2064,7 @@ function item_store($arr, $allow_exec = false) {
$arr['lang'] = detect_language($arr['body']);
// apply the input filter here - if it is obscured it has been filtered already
- $arr['body'] = z_input_filter($arr['uid'],$arr['body'],$arr['mimetype']);
+ $arr['body'] = trim(z_input_filter($arr['uid'],$arr['body'],$arr['mimetype']));
if(local_channel() && (! $arr['sig'])) {
$channel = get_app()->get_channel();
@@ -2461,7 +2461,7 @@ function item_store_update($arr,$allow_exec = false) {
$arr['lang'] = detect_language($arr['body']);
// apply the input filter here - if it is obscured it has been filtered already
- $arr['body'] = z_input_filter($arr['uid'],$arr['body'],$arr['mimetype']);
+ $arr['body'] = trim(z_input_filter($arr['uid'],$arr['body'],$arr['mimetype']));
if(local_channel() && (! $arr['sig'])) {
$channel = get_app()->get_channel();