From d7f5b18a9b8859f3bfb86c7466fea6a3e8de3be2 Mon Sep 17 00:00:00 2001 From: Jer Miller Date: Tue, 21 Apr 2026 19:51:21 -0600 Subject: [PATCH] convey: promote escapeHtml + renderMarkdown to AppServices MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds two public methods to window.AppServices in convey/static/app.js and deletes 11 escapeHtml + 7 renderMarkdown duplicates across apps/**/*.html. Removes four redundant per-app marked - diff --git a/apps/settings/workspace.html b/apps/settings/workspace.html index 82643bf1b..f6eb7ce3a 100644 --- a/apps/settings/workspace.html +++ b/apps/settings/workspace.html @@ -2964,6 +2964,7 @@ const saveTimeouts = new Map(); let logNextCursor = null; let insightsData = null; let keyValidationData = {}; +const escapeHtml = window.AppServices.escapeHtml; // ========== MODAL ACCESSIBILITY ========== function setupModalAccessibility(modalId) { @@ -5754,11 +5755,6 @@ if (resetAgentBtn) { }); } -function escapeHtml(str) { - if (!str) return ''; - return str.replace(/&/g, '&').replace(//g, '>').replace(/"/g, '"'); -} - // ========== STORAGE ========== let storageData = null; diff --git a/apps/sol/workspace.html b/apps/sol/workspace.html index 67e0c37ff..ed6a972b4 100644 --- a/apps/sol/workspace.html +++ b/apps/sol/workspace.html @@ -1159,8 +1159,6 @@ - - -