Skip to main content

How can I strip HTML from message content in my report? - Developer & Reporting / Creating Reports - Deskpro Support

How can I strip HTML from message content in my report?

Authors list

Question:

I have a report that includes ticket messages, but tickets created from email contain a lot of HTML tags so the message is hard to read. Is there anything I can do?

 

 

Answer:

In your report, instead of ticket_messages.message, use:

 

LEFT(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(tickets_messages.message, '<div>', ''), '</div>', ''), '<p>', ''), '</p>', ''), '<br />', ''), 25) AS 'Preview'

 

This will strip out the most common tags inserted by email clients, and make the messages more readable.

Noderīgs Nav noderīgs

27 no 70 cilvēkiem šo lapu atzina par noderīgu

Add a comment

Please log in or register to submit a comment.

Vēlaties atgādinājumu par paroli?