aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-10-27 21:16:59 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-10-27 21:16:59 -0700
commit07c0bc7b04ef2021ceb39c85e0458544df93edc8 (patch)
tree5002c84047d34aef81b48850293fa9825dad6ab8
parent65587be737e13e611f6e5ba67ee0301c312250b9 (diff)
downloadvolse-hubzilla-07c0bc7b04ef2021ceb39c85e0458544df93edc8.tar.gz
volse-hubzilla-07c0bc7b04ef2021ceb39c85e0458544df93edc8.tar.bz2
volse-hubzilla-07c0bc7b04ef2021ceb39c85e0458544df93edc8.zip
api posting with htmlstatus fails if it doesn't contain any html tags issue #104
-rw-r--r--include/api.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/api.php b/include/api.php
index 16dbb569b..73f4f57d0 100644
--- a/include/api.php
+++ b/include/api.php
@@ -826,6 +826,7 @@ require_once('include/attach.php');
require_once('include/html2bbcode.php');
$txt = requestdata('htmlstatus');
+
if((strpos($txt,'<') !== false) || (strpos($txt,'>') !== false)) {
$txt = html2bb_video($txt);
@@ -837,9 +838,10 @@ require_once('include/attach.php');
$purifier = new HTMLPurifier($config);
$txt = $purifier->purify($txt);
- $_REQUEST['body'] = html2bbcode($txt);
}
+ $_REQUEST['body'] = html2bbcode($txt);
+
}
else
$_REQUEST['body'] = requestdata('status');