Skip to content

Commit 2678d71

Browse files
committed
ACP2E-446:[Magento Quans] Any insight into why to the insight sanitation on the new media gallery is now more restrictive
1 parent 06be96e commit 2678d71

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

app/code/Magento/MediaGalleryUi/view/adminhtml/templates/container.phtml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
"masonryComponentPath": "media_gallery_listing.media_gallery_listing.media_gallery_columns"
2424
}
2525
}
26-
}
26+
},
27+
"Magento_MediaGalleryUi/js/validation/validate-filename": {}
2728
}
2829
}
2930
</script>

app/code/Magento/MediaGalleryUi/view/adminhtml/web/js/directory/directories.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,10 @@ define([
123123
content: $t(data.content),
124124
modalClass: 'media-gallery-folder-prompt',
125125
validation: true,
126-
validationRules: ['required-entry', 'validate-alphanum'],
126+
validationRules: ['required-entry', 'validate-filename'],
127127
attributesField: {
128128
name: 'folder_name',
129-
'data-validate': '{required:true, validate-alphanum}',
129+
'data-validate': '{required:true, validate-filename}',
130130
maxlength: '128'
131131
},
132132
attributesForm: {

0 commit comments

Comments
 (0)