api posting with htmlstatus fails if it doesn't contain any html tags issue #104
This commit is contained in:
parent
65587be737
commit
07c0bc7b04
@ -826,6 +826,7 @@ require_once('include/attach.php');
|
|||||||
require_once('include/html2bbcode.php');
|
require_once('include/html2bbcode.php');
|
||||||
|
|
||||||
$txt = requestdata('htmlstatus');
|
$txt = requestdata('htmlstatus');
|
||||||
|
|
||||||
if((strpos($txt,'<') !== false) || (strpos($txt,'>') !== false)) {
|
if((strpos($txt,'<') !== false) || (strpos($txt,'>') !== false)) {
|
||||||
|
|
||||||
$txt = html2bb_video($txt);
|
$txt = html2bb_video($txt);
|
||||||
@ -837,9 +838,10 @@ require_once('include/attach.php');
|
|||||||
$purifier = new HTMLPurifier($config);
|
$purifier = new HTMLPurifier($config);
|
||||||
$txt = $purifier->purify($txt);
|
$txt = $purifier->purify($txt);
|
||||||
|
|
||||||
$_REQUEST['body'] = html2bbcode($txt);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$_REQUEST['body'] = html2bbcode($txt);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
$_REQUEST['body'] = requestdata('status');
|
$_REQUEST['body'] = requestdata('status');
|
||||||
|
Reference in New Issue
Block a user