From b15ef69bf4461dce3663d00aa35a5dc335c7a544 Mon Sep 17 00:00:00 2001 From: johnnyq Date: Tue, 29 Sep 2026 17:22:53 -0400 Subject: [PATCH] Fix pretty content js helper in modals, fixes the issue with images going out of the boundry of the modal window --- agent/files.php | 3 +++ agent/js/ticket_change_client.js | 2 +- js/pretty_content.js | 23 +++++++++++++++++++++-- 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/agent/files.php b/agent/files.php index 956516df8..ff3e98acf 100644 --- a/agent/files.php +++ b/agent/files.php @@ -1334,6 +1334,8 @@ function updateModalContent() { // The endpoint returns HTMLPurifier output, which is what // document.php renders too docPanel.innerHTML = data.content || '

This document is empty.

'; + // Arrives after pretty_content.js's page-load pass, so run it again + prettyContent(); }) .catch(function () { if (requestedIndex === currentIndex) { @@ -1384,6 +1386,7 @@ document.addEventListener('keydown', function (e) { +