diff --git a/docs/administration.md b/docs/administration.md index 7fc9b481ae..c12d5ce33a 100644 --- a/docs/administration.md +++ b/docs/administration.md @@ -96,6 +96,8 @@ time with all the relevant data of the specific entry. The meaning of the fields The content is an answer to the question or a solution for a problem. The content can be edited with the included WYSIWYG (**W**hat **Y**ou **S**ee **I**s **W**hat **Y**ou **G**et) editor when JavaScript is enabled. You can place images where you want with the integrated image manager. The Editor can be disabled in the configuration if you want. + One important thing to remember is that you need to allow external hosts for images or videos in the configuration if + you want to use images from external sources. - **Language** You can select the language of your FAQ. By default, the selected language saved in the configuration will be chosen. diff --git a/phpmyfaq/admin/assets/src/utils/session.ts b/phpmyfaq/admin/assets/src/utils/session.ts index b4381cddc7..0f30cce628 100644 --- a/phpmyfaq/admin/assets/src/utils/session.ts +++ b/phpmyfaq/admin/assets/src/utils/session.ts @@ -43,9 +43,9 @@ const toggleSessionWarningModal = (toggle: string | null): void => { }; const reloadCurrentPage = (): void => { - const reloadButton = document.getElementById('pmf-button-reload-page'); + const reloadButton = document.getElementById('pmf-button-reload-page') as HTMLButtonElement; if (reloadButton) { - reloadButton.addEventListener('click', () => { + reloadButton.addEventListener('click', (): void => { location.reload(); }); } diff --git a/phpmyfaq/src/phpMyFAQ/Controller/Administration/Api/ImageController.php b/phpmyfaq/src/phpMyFAQ/Controller/Administration/Api/ImageController.php index ad3c2734e7..7c84d12eb9 100644 --- a/phpmyfaq/src/phpMyFAQ/Controller/Administration/Api/ImageController.php +++ b/phpmyfaq/src/phpMyFAQ/Controller/Administration/Api/ImageController.php @@ -96,6 +96,7 @@ public function upload(Request $request): JsonResponse // Accept upload if there was no origin, or if it is an accepted origin $fileName = $timestamp . '_' . $file->getClientOriginalName(); + $fileName = str_replace(' ', '_', $fileName); $file->move($uploadDir, $fileName); // Add to the list of uploaded files