Insert file names as break-separated text nodes

Co-authored-by: El RIDO <elrido@gmx.net>
This commit is contained in:
Mikhail Romanov 2025-11-11 20:05:32 +02:00 committed by GitHub
parent 9c71fbcc70
commit ff5aee85b4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3091,9 +3091,9 @@ jQuery.PrivateBin = (function($) {
function printDragAndDropFileNames(fileNames) {
$dragAndDropFileNames.empty();
fileNames.forEach(fileName => {
const div = document.createElement('div');
div.textContent = fileName;
$(div).appendTo($dragAndDropFileNames);
const name = document.createTextNode(fileName);
$dragAndDropFileNames[0].appendChild(name);
$dragAndDropFileNames[0].appendChild(document.createElement('br'));
});
}