revert html in markdown for posts, but trim the input before processing the markdown

This commit is contained in:
redmatrix 2015-11-15 18:03:37 -08:00
parent 959c3ba89d
commit 3d80073a0e
2 changed files with 2 additions and 2 deletions

View File

@ -3181,7 +3181,7 @@ function tag_deliver($uid, $item_id) {
}
if((! $mention) && (! $union)) {
logger('tag_deliver: no mention and no union.');
logger('tag_deliver: no mention for ' . $u[0]['channel_name'] . ' and no union.');
return;
}

View File

@ -473,8 +473,8 @@ function item_post(&$a) {
require_once('include/text.php');
if($uid && $uid == $profile_uid && feature_enabled($uid,'markdown')) {
require_once('include/bb2diaspora.php');
$body = escape_tags(trim($body));
$body = str_replace("\n",'<br />', $body);
$body = purify_html($body);
$body = preg_replace_callback('/\[share(.*?)\]/ism','share_shield',$body);
$body = diaspora2bb($body,true);