mirror of
https://github.com/pelican-dev/panel.git
synced 2026-02-25 03:14:39 +03:00
[PR #1295] [CLOSED] Fix file browser breaking with special characters in filenames #1309
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/pelican-dev/panel/pull/1295
Author: @Scvtt
Created: 4/24/2025
Status: ❌ Closed
Base:
main← Head:file-browser📝 Commits (6)
f226402Implement base64 encoding for safe filename handling34de07dUpdate file operations to handle special characters812445dcorrect parameter order in renameFiles call5eff4b2Remove unnecessary whitespace9707e35fix plint issues8fab9b5Merge branch 'pelican-dev:main' into file-browser📊 Changes
2 files changed (+70 additions, -42 deletions)
View changed files
📝
app/Filament/Server/Resources/FileResource/Pages/ListFiles.php(+63 -41)📝
app/Models/File.php(+7 -1)📄 Description
Summary
Fixed an issue where the file browser would become unusable after uploading or handling files with special characters (like quotes) in their names. The issue was caused by unescaped special characters breaking JavaScript execution in the frontend.
Technical Changes
Modified the File model to handle special characters safely:
display_namefield for UI displayUpdated ListFiles implementation:
display_namefor showing filenamesFile operations now properly handle special characters:
Impact
Testing
Verified working with filenames containing:
Related Issues
Fixes Issue #1211
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.