import html
tet = "Error while sending message to module processor: Sender Channel 'CC_Rest_Get_MaterialInfo_Sender' (ID: cf706274384d32328fedb3ddb877b8ad): Catching exception calling messaging system: java.io.IOException: Error receiving or parsing request message: com.sap.aii.af.sdk.xi.mo.MalformedMessageException: Can't parse the document; nested exception caused by: com.sap.aii.af.sdk.xi.util.XMLScanException: Can't parse the document; nested exception caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1193; The element type "meta" must be terminated by the matching end-tag "</meta>""
clean_tet = html.unescape(tet)
print(clean_tet)
输出:
Error while sending message to module processor: Sender Channel 'CC_Rest_Get_MaterialInfo_Sender' (ID: cf706274384d32328fedb3ddb877b8ad): Catching exception calling messaging system: java.io.IOException: Error receiving or parsing request message: com.sap.aii.af.sdk.xi.mo.MalformedMessageException: Can't parse the document; nested exception caused by: com.sap.aii.af.sdk.xi.util.XMLScanException: Can't parse the document; nested exception caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1193; The element type "meta" must be terminated by the matching end-tag "</meta>"