uvdesk / community-skeleton

UVdesk Opensource Community Helpdesk Project built for all to make a Full Ticketing Support System along with many more other features.
https://www.uvdesk.com
MIT License
7.15k stars 449 forks source link

If there is a <base> #719

Open serjsv87 opened 4 months ago

serjsv87 commented 4 months ago

If a client replied via email, and there is a <base ...> tag in the email, then in the end all links are taken starting from this tag and it is impossible to reply. I suggest a fix

uvdesk/core-framework/Services/TicketService.php

            $dbTime = $threadDetails['createdAt'];
            $formattedTime = $this->fomatTimeByPreference($dbTime,$timeZone,$timeFormat,$agentTimeZone,$agentTimeFormat);

+++++            $threadDetails['message'] = preg_replace('/<base[^>]*>/', '', $threadDetails['message']);

            $threadResponse = [
                'id' => $threadDetails['id'],
                'user' => null,