글쓰기 되돌리기와 미디어 관리 보정
This commit is contained in:
@@ -350,9 +350,11 @@ export const deleteMediaFolder = async (path) => {
|
||||
* @param {string} value - 원본 파일명
|
||||
* @returns {string} 정리된 파일명
|
||||
*/
|
||||
export const sanitizeMediaName = (value) => value
|
||||
.replace(/[^a-zA-Z0-9가-힣._-]/g, '-')
|
||||
export const sanitizeMediaName = (value) => String(value || '')
|
||||
.normalize('NFC')
|
||||
.replace(/[^\p{L}\p{N}._-]+/gu, '-')
|
||||
.replace(/-+/g, '-')
|
||||
.replace(/^\.+|\.+$/g, '')
|
||||
.replace(/^-|-$/g, '')
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user