kopia lustrzana https://github.com/wagtail/wagtail
rodzic
eaccdc736c
commit
982ada9aa7
|
@ -7,6 +7,18 @@ 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) {
|
||||
|
|
Ładowanie…
Reference in New Issue