$_REQUEST["title"] = "";
- $_REQUEST["body"] = PageInfo::appendToBody($post->text, true);
+ $_REQUEST["body"] = PageInfo::searchAndAppendToBody($post->text, true);
if (is_string($post->place->name)) {
$_REQUEST["location"] = $post->place->name;
}
} elseif ($picture) {
$body .= "\n\n[img]" . $picture . "[/img]\n";
} else {
- $body = PageInfo::appendToBody($body);
+ $body = PageInfo::searchAndAppendToBody($body);
}
}
- return ['body' => $body, 'plain' => $plain, 'taglist' => $taglist];
+ return ['body' => $body, 'plain' => trim($plain), 'taglist' => $taglist];
}
/**