'{<([^>\s|]+)[\s|]([^>]+)>}' => '<a href="$1">$2</a>', # hyperlink
"/\r\n?/" => "\n", # unix newlines
"/ +\n/" => "<br />", # trailing spaces for hard line break
+ '{^(/data/.*\.jpe?g)\z}m' => '<img src="/thumb/640x/\1" />', # image reference
"/^[-*] (.*)$\n?/m" => '<li>$1</li>', # list item
"/^(.+)$\n?/m" => "<p>$1</p>\n", # paragraph
"{^<p>(<li>.*</li>)(?:</p>\n)?}m" => "<ul>$1</ul>\n", # list container
$reply['raw'] = $body;
$reply['message'] = messagehtml($body);
}
- if (isset($input['announce'])) {
- $reply['announced'] = !!$input['announce'];
- }
if ($_FILES and !empty($_FILES['image'])) {
$target = 'data/upload';
if (!file_exists($target)) {
}
}
}
+ if (!$reply) {
+ throw new Exception("lege inhoud");
+ }
+ if (isset($input['announce'])) {
+ $reply['announced'] = !!$input['announce'];
+ }
if (isset($input['id'])) {
$newcomment = $input['id'];