Open jbostoen opened 2 years ago
Another interesting note in the design: MS Outlook for example adds this HTML
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Some Name <some@address.ext><br>
<b>Sent:</b> Friday, December 15, 2023 9:59:10 AM<br>
<b>To:</b> Jeffrey Bostoen <some@address.ext><br>
<b>Subject:</b> RE: something</font>
<div> </div>
</div>
...
Now, note that iTop does HTML sanitizing; and that this has changed a bit over time already (for example: ordered/unordered lists).
https://www.itophub.io/wiki/page?id=latest:admin:rich_text_limitations
So when developing something, it may be worth considering whether this is compared against the original HTML (so also -temporarily- store the original HTML rather than the sanitized one).
French version:
De : Abc Def support@x.be Envoyé : vendredi 29 décembre 2023 14:42 À : Abc Def x@x.ma Cc : y@x.ma Objet : [ R-000322 ] iTop: xxx
In iTop, after sanitizing, all the above content was in a SPAN element.
Also a point to consider: inline images (links).
Note: this feature can be sponsored!
Use case: agent responds from iTop to the client. E-mail is sent to the client; client hits "reply". Automatically the e-mail message with the agent's reply is included.
It may be interesting in an e-mail based ticket system to only keep the "new" part of the email and strip the other parts.
Scenarios to consider, which complicate the implementation:
Just splitting by a basic pattern or occurrence of certain HTML is a bad idea:
Ideal situation would be if log entries could be queried separately. However, iTop still doesn't support this.
Other difficulties: the current implementation of Mail to Ticket (Combodo and this fork) build a description and also process inline images etc, adding new links with random IDs.
So the basic approach, considering the current limitations:
Known limitations:
Investigation needed: