Backport #980, #981, #984 to 0.3

This commit is contained in:
Garret Wassermann 2021-11-19 00:30:20 -05:00
parent e016e6699d
commit 44abb19712
3 changed files with 9 additions and 4 deletions

View File

@ -145,6 +145,7 @@ def process_attachments(followup, attached_files):
'application/octet-stream',
size=attached.size,
)
att.full_clean()
att.save()
if attached.size < max_email_attachment_size:

View File

@ -1,8 +1,8 @@
from celery.decorators import task
from celery import shared_task
from .email import process_email
@task()
@shared_task
def helpdesk_process_email():
process_email()

View File

@ -331,6 +331,10 @@
return "{% url 'helpdesk:view' 1234 %}".replace(/1234/, row.id.toString());
}
function htmlEntities(str) {
return String(str).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;');
}
$(document).ready(function () {
// Ticket DataTable Initialization
$('#ticketTable').DataTable({
@ -366,7 +370,7 @@
if (type === 'display') {
data = '<div class="tickettitle"><a href="' + get_url(row) + '" >' +
row.id + '. ' +
row.title + '</a></div>';
htmlEntities(row.title) + '</a></div>';
}
return data
}