From 15ce876488a72c5c64b92049251eb0dc87c1f192 Mon Sep 17 00:00:00 2001 From: Richard Qi Date: Wed, 25 Oct 2023 12:18:48 -0700 Subject: [PATCH] replace deprecated method --- .../applicantcorrespondence/applicantcorrespondencelog.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/request-management-api/request_api/services/applicantcorrespondence/applicantcorrespondencelog.py b/request-management-api/request_api/services/applicantcorrespondence/applicantcorrespondencelog.py index e1ce8290d..715ad9056 100644 --- a/request-management-api/request_api/services/applicantcorrespondence/applicantcorrespondencelog.py +++ b/request-management-api/request_api/services/applicantcorrespondence/applicantcorrespondencelog.py @@ -4,7 +4,7 @@ import maya import json -from html.parser import HTMLParser +import html from datetime import datetime class applicantcorrespondenceservice: @@ -57,8 +57,7 @@ def updateapplicantcorrespondencelog(self, correspondenceid, content): def getapplicantcorrespondencelogbyid(self, applicantcorrespondenceid): applicantcorrespondence = FOIApplicantCorrespondence.getapplicantcorrespondencebyid(applicantcorrespondenceid) (_correspondencemessagejson, _isjson) = self.__getjsonobject(applicantcorrespondence["correspondencemessagejson"]) - parser = HTMLParser() - emailhtml_decoded_string = parser.unescape(self.__getvaluefromjson(_correspondencemessagejson, 'emailhtml')) + emailhtml_decoded_string = html.unescape(self.__getvaluefromjson(_correspondencemessagejson, 'emailhtml')) return emailhtml_decoded_string if _isjson else _correspondencemessagejson def getlatestapplicantcorrespondence(self, ministryid):