diff --git a/assets/typescript/Forum/Posting.ts b/assets/typescript/Forum/Posting.ts index ac46bb27..acade6c9 100644 --- a/assets/typescript/Forum/Posting.ts +++ b/assets/typescript/Forum/Posting.ts @@ -157,7 +157,7 @@ function forumPostingPreview( callback(false, 'Failed to render preview.'); } }); - xhr.open('POST', '/forum/posting.php'); + xhr.open('POST', urlFormat('forum-topic-new')); xhr.withCredentials = true; xhr.send(formData); } diff --git a/src/tpl.php b/src/tpl.php index 705a49bc..eceab438 100644 --- a/src/tpl.php +++ b/src/tpl.php @@ -47,7 +47,7 @@ function tpl_sanitise_path(string $path): string return $path; } - return str_replace('.', '/', $path) . MSZ_TPL_FILE_EXT; + return str_replace('.', DIRECTORY_SEPARATOR, $path) . MSZ_TPL_FILE_EXT; } function tpl_exists(string $path): bool