kopia lustrzana https://github.com/wagtail/wagtail
rodzic
eaccdc736c
commit
982ada9aa7
|
@ -7,6 +7,18 @@ function addMessage(status, text) {
|
||||||
}, 100);
|
}, 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function escapeHtml(text) {
|
||||||
|
var map = {
|
||||||
|
'&': '&',
|
||||||
|
'<': '<',
|
||||||
|
'>': '>',
|
||||||
|
'"': '"',
|
||||||
|
"'": '''
|
||||||
|
};
|
||||||
|
|
||||||
|
return text.replace(/[&<>"']/g, function(m) { return map[m]; });
|
||||||
|
}
|
||||||
|
|
||||||
$(function() {
|
$(function() {
|
||||||
// Add class to the body from which transitions may be hung so they don't appear to transition as the page loads
|
// 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');
|
$('body').addClass('ready');
|
||||||
|
|
|
@ -38,7 +38,7 @@ $(function() {
|
||||||
}).always(function() {
|
}).always(function() {
|
||||||
data.context.removeClass('processing');
|
data.context.removeClass('processing');
|
||||||
data.context.find('.left').each(function(index, elm) {
|
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) {
|
data.context.find('.preview .thumb').each(function(index, elm) {
|
||||||
|
|
Ładowanie…
Reference in New Issue