From 737866641618660c7b03cee6520d7f5563d53bd1 Mon Sep 17 00:00:00 2001 From: "Valentin V. Bartenev" Date: Sun, 17 May 2026 06:11:52 +0300 Subject: [PATCH] Web: link neighbour IDs to meshcoretel.ru profile pages renderNeighbourId in the /stats neighbours table now checks for the "full_id" field emitted by appendJsonNeighbours(). If the value is a valid 64-character hex string (the node's full 32-byte public key), the short ID is wrapped in an anchor tag pointing to https://meshcoretel.ru/ (target="_blank", rel="noopener noreferrer"). Falls back to plain short ID when "full_id" is absent or does not match the expected pattern. --- src/helpers/web/WebPanelServer.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/helpers/web/WebPanelServer.cpp b/src/helpers/web/WebPanelServer.cpp index aa73b5fb..3c3e2938 100644 --- a/src/helpers/web/WebPanelServer.cpp +++ b/src/helpers/web/WebPanelServer.cpp @@ -1661,7 +1661,12 @@ const char kWebPanelAppHtml[] PROGMEM = R"HTML( } const renderNeighbourId = (neighbour) => { const shortId = escapeHtml(neighbour.id || "--"); - return shortId; + const fullId = typeof neighbour.full_id === "string" ? neighbour.full_id.trim() : ""; + if (!/^[0-9A-Fa-f]{64}$/.test(fullId)) { + return shortId; + } + const href = "https://meshcoretel.ru/" + encodeURIComponent(fullId.toUpperCase()); + return `${shortId}`; }; const rows = neighbours.map((neighbour) => ` ${renderNeighbourId(neighbour)}