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
Open Software License 3.0
9.13k stars 464 forks source link

If there is a <base> #719

Open serjsv87 opened 9 months ago

serjsv87 commented 9 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,