Hopp over til hovedinnhold

How can I strip HTML from message content in my report? - Kunnskapsbase / Deskpro Legacy - Deskpro Support

WARNING: You're browsing documentation for an older version of Deskpro. For the most up-to-date version, see: How can I strip HTML from message content in my Reports?

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

Forfatterliste

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.

Til hjelp Ikke til hjelp

36 av 90 personer syntes denne siden var til hjelp

Ny kommentar

Logg på for å registrere eller sende inn en kommentar.

Trenger du en påminnelse om passord? '