--- live.node.inc.bak 2008-11-10 12:45:53.000000000 +0100 +++ live.node.inc 2008-11-10 12:48:28.000000000 +0100 @@ -11,18 +11,18 @@ $node->teaser_include = $_POST['teaser_include'] == 0 ? 0 : 1; $node->teaser = isset($_POST['teaser_js']) ? trim($_POST['teaser_js']) : ''; $body = isset($_POST['body']) ? trim($_POST['body']) : ''; - $node->body = check_markup($body, $format); + $node->format = isset($_POST['format']) ? $_POST['format'] : 1; + $node->body = check_markup($body, $node->format); $node->name = isset($_POST['username']) ? $_POST['username'] : ''; $node->created = isset($_POST['date']) ? strtotime($_POST['date']) : time(); $access = user_access('use live comment preview'); $token = $_POST['token'] != "" ? $_POST['token'] : ""; $skip_anonymous = $user->uid == 0 ? true : false; - $format = isset($_POST['format']) ? $_POST['format'] : 1; $token_value = isset($_POST['token_value']) ? $_POST['token_value'] : ''; $valid_token = drupal_valid_token($token, $token_value, $skip_anonymous); - if (!filter_access($format) || !$access || !$valid_token || !node_access('create', $node) || !node_access('update', $node)) { + if (!filter_access($node->format) || !$access || !$valid_token || !node_access('create', $node) || !node_access('update', $node)) { // SECURITY CHECK! // Deny access: // 1) If the current user is not allowed to use specified input format; or