글쓰기 되돌리기와 미디어 관리 보정

This commit is contained in:
2026-06-17 10:12:24 +09:00
parent d41cb71d40
commit 11f8402cb6
12 changed files with 141 additions and 32 deletions

View File

@@ -59,9 +59,11 @@ const allowedUploadExtensions = new Set([
* @param {string} value - 원본 경로 조각
* @returns {string} 정리된 경로 조각
*/
const sanitizePathPart = (value) => value
.replace(/[^a-zA-Z0-9가-힣._-]/g, '-')
const sanitizePathPart = (value) => String(value || '')
.normalize('NFC')
.replace(/[^\p{L}\p{N}._-]+/gu, '-')
.replace(/-+/g, '-')
.replace(/^\.+|\.+$/g, '')
.replace(/^-|-$/g, '')
/**