mirror of
https://github.com/wagtail/wagtail.git
synced 2024-11-29 17:36:49 +01:00
Merge pull request #1299 from veryhappythings/fix-image-filenames
Fix image filenames
This commit is contained in:
commit
13e8c5b04b
@ -7,6 +7,20 @@ function addMessage(status, text) {
|
||||
}, 100);
|
||||
}
|
||||
|
||||
function escapeHtml(text) {
|
||||
var map = {
|
||||
'&': '&',
|
||||
'<': '<',
|
||||
'>': '>',
|
||||
'"': '"',
|
||||
'\'': '''
|
||||
};
|
||||
|
||||
return text.replace(/[&<>"']/g, function(m) {
|
||||
return map[m];
|
||||
});
|
||||
}
|
||||
|
||||
$(function() {
|
||||
// Add class to the body from which transitions may be hung so they don't appear to transition as the page loads
|
||||
$('body').addClass('ready');
|
||||
|
@ -38,7 +38,7 @@ $(function() {
|
||||
}).always(function() {
|
||||
data.context.removeClass('processing');
|
||||
data.context.find('.left').each(function(index, elm) {
|
||||
$(elm).append(data.files[index].name);
|
||||
$(elm).append(escapeHtml(data.files[index].name));
|
||||
});
|
||||
|
||||
data.context.find('.preview .thumb').each(function(index, elm) {
|
||||
|
Loading…
Reference in New Issue
Block a user