diff --git a/admin/action/create_page.php b/admin/action/create_page.php index 1377eb1..0141505 100644 --- a/admin/action/create_page.php +++ b/admin/action/create_page.php @@ -11,6 +11,9 @@ $post_content = $_POST['content']; } if(!empty($post_url) && !empty($post_content)) { + if(get_magic_quotes_gpc()) { + $post_content = stripslashes($post_content); + } $filename = $post_url . '.md'; $dir = '../../content/static/'; if(is_dir($dir)) { diff --git a/admin/action/create_post.php b/admin/action/create_post.php index 112be96..be9ff88 100644 --- a/admin/action/create_post.php +++ b/admin/action/create_post.php @@ -14,6 +14,9 @@ $post_content = $_POST['content']; } if(!empty($post_tag) && !empty($post_url) && !empty($post_content)) { + if(get_magic_quotes_gpc()) { + $post_content = stripslashes($post_content); + } $user = $_SESSION['user']; $filename = $post_date . '_' . $post_tag . '_' . $post_url . '.md'; $dir = '../../content/' . $user. '/blog/'; diff --git a/admin/action/edit_bio.php b/admin/action/edit_bio.php index 5afc9fb..fbce409 100644 --- a/admin/action/edit_bio.php +++ b/admin/action/edit_bio.php @@ -18,6 +18,9 @@ $bio_content = $_POST['content']; } if(!empty($bio_content)) { + if(get_magic_quotes_gpc()) { + $bio_content = stripslashes($bio_content); + } $dir = '../../content/' . $user. '/'; if(is_dir($dir)) { file_put_contents($dir . $filename, print_r($bio_content, true)); diff --git a/admin/action/edit_page.php b/admin/action/edit_page.php index 3aea9f9..86f0161 100644 --- a/admin/action/edit_page.php +++ b/admin/action/edit_page.php @@ -22,6 +22,9 @@ $post_content = $_POST['content']; } if(!empty($post_content)) { + if(get_magic_quotes_gpc()) { + $post_content = stripslashes($post_content); + } $newurl = $dir . '/' . $post_url . '.md'; if($url === $newurl) { file_put_contents($url, print_r($post_content, true)); diff --git a/admin/action/edit_post.php b/admin/action/edit_post.php index d1ffada..80c2a05 100644 --- a/admin/action/edit_post.php +++ b/admin/action/edit_post.php @@ -28,6 +28,9 @@ $post_content = $_POST['content']; } if(!empty($post_content)) { + if(get_magic_quotes_gpc()) { + $post_content = stripslashes($post_content); + } $newurl = $oldurl[0] . '_' . $post_tag . '_' . $post_url . '.md'; if($url === $newurl) { file_put_contents($url, print_r($post_content, true)); diff --git a/system/includes/functions.php b/system/includes/functions.php index 1aed605..c2f7862 100644 --- a/system/includes/functions.php +++ b/system/includes/functions.php @@ -530,9 +530,9 @@ function archive_list() { echo '(' . count($months) . ')'; echo '