From 4af7eacfd8eefab78d1e38962e37a3c7daf650f0 Mon Sep 17 00:00:00 2001
From: Xenomporio <>
Date: Sat, 6 Aug 2022 10:40:58 +0200
Subject: [PATCH] Ticket system / sendmail, changes to response citation and
html chars handling
---
www/lib/class.erpapi.php | 9 ++-------
www/pages/ticket.php | 11 ++++++++---
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/www/lib/class.erpapi.php b/www/lib/class.erpapi.php
index fca8ca7b..ed77f5ee 100644
--- a/www/lib/class.erpapi.php
+++ b/www/lib/class.erpapi.php
@@ -32483,15 +32483,10 @@ function MailSendFinal($from,$from_name,$to,$to_name,$betreff,$text,$files="",$p
$text = $this->ReadyForPDF($text);
$text = str_replace('€','€',$text);
- $texthtml = htmlspecialchars_decode(
+/* $text = htmlspecialchars_decode(
htmlentities($text, ENT_NOQUOTES, 'UTF-8', false)
, ENT_NOQUOTES
- );
-
- if($texthtml!=$text)
- {
- $text = $texthtml;
- }
+ ); */
if($signature)
{
diff --git a/www/pages/ticket.php b/www/pages/ticket.php
index 24e9abea..b36e42d9 100644
--- a/www/pages/ticket.php
+++ b/www/pages/ticket.php
@@ -615,7 +615,12 @@ class Ticket {
break;
case 'zitat':
if (!empty($drafted_messages) && !empty($recv_messages)) {
- $sql = "UPDATE ticket_nachricht SET text='".$drafted_messages[0]['text']."
--------------------
".$recv_messages[0]['verfasser']." <".$recv_messages[0]['mail']."> (".$recv_messages[0]['zeit']."):
".$recv_messages[0]['text']."' WHERE id=".$drafted_messages[0]['id'];
+
+ $nl = "
";
+ $citation_info =$recv_messages[0]['zeit']." ".$recv_messages[0]['verfasser']." <".$recv_messages[0]['mail'].">";
+ $text = $drafted_messages[0]['text'].$nl.$nl.$citation_info.":".$nl."
".$recv_messages[0]['text'].""; + + $sql = "UPDATE ticket_nachricht SET text='".$text."' WHERE id=".$drafted_messages[0]['id']; $this->app->DB->Update($sql); header("Location: index.php?module=ticket&action=edit&id=$id"); $this->app->ExitXentral(); @@ -657,8 +662,8 @@ class Ticket { $drafted_messages[0]['verfasser_replyto'], $to, $to, - $drafted_messages[0]['betreff'], - $drafted_messages[0]['text'], + htmlentities($drafted_messages[0]['betreff']), + htmlentities($drafted_messages[0]['text']), $files, 0, true,