if (!$rdbk->create($_POST['gpx'])) { renderAjax(array('success' => false)); } $options = array('display_note' => $display_note, 'display_short_desc' => $display_short_desc, 'display_long_desc' => $display_long_desc, 'display_hint' => $display_hint, 'display_logs' => $display_logs, 'display_waypoints' => $display_waypoints, 'display_spoilers' => $display_spoilers, 'sort_by' => $sort_by, 'pagebreak' => $pagebreak); $rdbk->convertXmlToHtml($_POST['locale'], $options)->cleanHtml(); // Table of content if ($display_toc) { $rdbk->addToc(); } // remove images from short and long description if ($images) { $rdbk->removeImages($display_short_desc); } // Hint if ($display_hint && $hint_encrypted) { $rdbk->encryptHints(); } // Spoilers if ($display_spoilers) { $rdbk->addSpoilers(); } // Waypoints if ($display_waypoints) { $rdbk->addWaypoints(); } // Parse logs if ($display_logs) { $rdbk->parseMarkdown()->parseBBcode(); } $rdbk->getOnlyBody(); $rdbk->saveFile($rdbk->html_file, $rdbk->html);