Removed <strong> in error response to prevent raw html insertion
This commit is contained in:
parent
564a7e8254
commit
fe5da22985
@ -66,7 +66,6 @@ $('#multiFileUpload').dropzone({
|
||||
let res = eval('(' + data.xhr.responseText + ')');
|
||||
});
|
||||
this.on("error", function(file, message) {
|
||||
console.log(message);
|
||||
$('.alert').html('');
|
||||
$('#errorZone').append(message.error);
|
||||
$('#errorZone').show();
|
||||
|
@ -61,8 +61,8 @@ class UploadView(LoginRequiredMixin, FormView):
|
||||
module_info = toml.loads(f.read())
|
||||
for required_field in REQUIRED_FIELDS:
|
||||
if not required_field in module_info.keys():
|
||||
return JsonResponse({'error': f'Field <strong>{required_field}\
|
||||
</strong> is missing.'}, status=500)
|
||||
return JsonResponse({'error': f'Field {required_field}\
|
||||
is missing.'}, status=500)
|
||||
shutil.rmtree(extract_path)
|
||||
os.remove(zip_path)
|
||||
if Module.objects.filter(name=module_info['name'].lower(),
|
||||
|
Loading…
Reference in New Issue
Block a user