Fix contact notes with line feeds.

When saving contact notes, it would add extra line feeds. The escaping caused this issue.
This commit is contained in:
FusionPBX 2025-03-01 22:25:06 -07:00 committed by GitHub
parent de516ed210
commit 06c20ef292
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 2 deletions

View File

@ -2719,8 +2719,9 @@ if (permission_exists('contact_note_view')) {
$x = 0; $x = 0;
foreach($contact_notes as $row) { foreach($contact_notes as $row) {
$contact_note = $row['contact_note']; $contact_note = $row['contact_note'];
$contact_note = escape($contact_note); if (!empty($contact_note)) {
$contact_note = str_replace("\n","<br />",$contact_note); $contact_note = htmlspecialcars($contact_note, ENT_QUOTES, 'UTF-8');
}
if (permission_exists('contact_note_add')) { if (permission_exists('contact_note_add')) {
$list_row_url = "contact_note_edit.php?contact_uuid=".escape($row['contact_uuid'])."&id=".escape($row['contact_note_uuid']); $list_row_url = "contact_note_edit.php?contact_uuid=".escape($row['contact_uuid'])."&id=".escape($row['contact_note_uuid']);
} }