From 07c0bc7b04ef2021ceb39c85e0458544df93edc8 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Tue, 27 Oct 2015 21:16:59 -0700 Subject: api posting with htmlstatus fails if it doesn't contain any html tags issue #104 --- include/api.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include') 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'); -- cgit v1.2.3