perf: 工单备注 markdown (#9706)

Co-authored-by: feng <1304903146@qq.com>
pull/9703/head
fit2bot 2 years ago committed by GitHub
parent 58341a9e85
commit 2279219404
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,14 +1,13 @@
import html2text
from django.utils.translation import ugettext as _
from django.template.loader import render_to_string
from django.utils.translation import ugettext as _
from common.utils import get_logger
from tickets.const import TicketState, TicketType
from tickets.utils import (
send_ticket_processed_mail_to_applicant,
send_ticket_applied_mail_to_assignees
)
from tickets.const import TicketState, TicketType
logger = get_logger(__name__)
@ -112,4 +111,6 @@ class BaseHandler:
@staticmethod
def safe_html_script(unsafe_html):
return html2text.html2text(unsafe_html)
unsafe_html = unsafe_html.replace('\n', '')
html_str = html2text.html2text(unsafe_html)
return html_str

Loading…
Cancel
Save