From 556f895adf9fd82795777eb4e5f9eda61f66898d Mon Sep 17 00:00:00 2001
From: "Hahn Axel (hahn)" <axel.hahn@unibe.ch>
Date: Thu, 7 Dec 2023 12:59:00 +0100
Subject: [PATCH] fix output of commit msg during build

---
 public_html/deployment/classes/project.class.php | 15 ++-------------
 1 file changed, 2 insertions(+), 13 deletions(-)

diff --git a/public_html/deployment/classes/project.class.php b/public_html/deployment/classes/project.class.php
index 7af763ac..4a859b54 100644
--- a/public_html/deployment/classes/project.class.php
+++ b/public_html/deployment/classes/project.class.php
@@ -1726,9 +1726,8 @@ class project extends base
         $aVersion = $this->_oVcs->getRevision($sTempBuildDir);
         $sRevision = $aVersion["revision"];
         $sCommitMsg = $aVersion["message"];
-        $sCommitMsg = str_replace("\n", "<br>", $sCommitMsg);
-        $sCommitMsg = str_replace('"', "&quot;", $sCommitMsg);
-        $sReturn .= $this->_oHtml->getBox("info", $sCommitMsg);
+        $sReturn .= $this->_oHtml->getBox("info", t('commitmessage') . '<pre>'.htmlentities($sCommitMsg).'</pre>');
+
 
         $sReturn .= $this->_execAndSend("ls -lisa $sTempBuildDir");
 
@@ -1901,16 +1900,6 @@ class project extends base
             'revision' => $sRevision,
             'message' => $sCommitMsg,
         );
-        /*
-          $sInfos = '{
-          "date": "' . $sTs . '",
-          "version": "' . $sTs2 . '",
-          "branch": "' . $sBranch . '",
-          "revision": "' . $sRevision . '",
-          "message": "' . $sCommitMsg . '"
-          }';
-         * 
-         */
         /*
           "user": "' . $aParams["inputUser"] . '",
           "remark": "' . $aParams["inputComment"] . '"
-- 
GitLab