diff --git a/README.md b/README.md index aa86480..2442553 100644 --- a/README.md +++ b/README.md @@ -185,7 +185,7 @@ When you write a blog post and save it via the admin panel, HTMLy automatically Here's the explanation (separated by an underscore): -- `2014-01-31-12-56-40` is the published date. The date format is `yyyy-mm-dd-hh-mm-ss` +- `2014-01-31-12-56-40` is the published date. The date format is `Y-m-d-H-i-s` - `tag1,tag2,tag3` are the tags, separated by commas - `databaseless-blogging-platform-flat-file-blog` is the URL diff --git a/system/admin/admin.php b/system/admin/admin.php index fd9b6f8..5e294f4 100644 --- a/system/admin/admin.php +++ b/system/admin/admin.php @@ -184,8 +184,6 @@ function add_content($title, $tag, $url, $content, $user, $draft, $category, $ty if (!empty($post_title) && !empty($post_tag) && !empty($post_url) && !empty($post_content)) { - $post_content = stripslashes($post_content); - $filename = $post_date . '_' . $post_tag . '_' . $post_url . '.md'; if (empty($draft)) { @@ -344,8 +342,6 @@ function edit_content($title, $tag, $url, $content, $oldfile, $revertPost, $publ if (!empty($post_title) && !empty($post_tag) && !empty($post_url) && !empty($post_content)) { - $post_content = stripslashes($post_content); - if(!empty($revertPost) || !empty($publishDraft)) { if($dir[4] == 'draft') { @@ -499,8 +495,6 @@ function add_page($title, $url, $content, $description = null) if (!empty($post_title) && !empty($post_url) && !empty($post_content)) { - $post_content = stripslashes($post_content); - $filename = $post_url . '.md'; $dir = 'content/static/'; if (is_dir($dir)) { @@ -537,8 +531,6 @@ function add_sub_page($title, $url, $content, $static, $description = null) if (!empty($post_title) && !empty($post_url) && !empty($post_content)) { - $post_content = stripslashes($post_content); - $filename = $post_url . '.md'; $dir = 'content/static/' . $static . '/'; if (is_dir($dir)) { @@ -578,8 +570,6 @@ function edit_page($title, $url, $content, $oldfile, $destination = null, $descr if (!empty($post_title) && !empty($post_url) && !empty($post_content)) { - $post_content = stripslashes($post_content); - $newfile = $dir . '/' . $post_url . '.md'; if ($oldfile === $newfile) { file_put_contents($oldfile, print_r($post_content, true)); @@ -641,8 +631,6 @@ function add_category($title, $url, $content, $description = null) if (!empty($post_title) && !empty($post_url) && !empty($post_content)) { - $post_content = stripslashes($post_content); - $filename = $post_url . '.md'; $dir = 'content/data/category/'; if (is_dir($dir)) { @@ -679,8 +667,6 @@ function edit_category($title, $url, $content, $oldfile, $destination = null, $d $post_content = '' . $post_description . "\n\n" . $content; if (!empty($post_title) && !empty($post_url) && !empty($post_content)) { - $post_content = stripslashes($post_content); - $newfile = $dir . '/' . $post_url . '.md'; if ($oldfile === $newfile) { file_put_contents($oldfile, print_r($post_content, true)); @@ -709,8 +695,6 @@ function edit_profile($title, $content, $user) if (!empty($user_title) && !empty($user_content)) { - $user_content = stripslashes($user_content); - $dir = 'content/' . $user . '/'; $filename = 'content/' . $user . '/author.md'; if (is_dir($dir)) { @@ -733,8 +717,6 @@ function edit_frontpage($title, $content) if (!empty($front_title) && !empty($front_content)) { - $front_content = stripslashes($front_content); - $dir = 'content/data/frontpage'; $filename = 'content/data/frontpage/frontpage.md'; if (is_dir($dir)) { @@ -824,8 +806,6 @@ function migrate($title, $time, $tags, $content, $url, $user, $source) } if (!empty($post_title) && !empty($post_tag) && !empty($post_url) && !empty($post_content)) { - $post_content = stripslashes($post_content); - $filename = $post_date . '_' . $post_tag . '_' . $post_url . '.md'; $dir = 'content/' . $user . '/blog/uncategorized/post/'; if (is_dir($dir)) {