From e82ed2fdfd9ebc4fcb2af5525772833addf14703 Mon Sep 17 00:00:00 2001 From: furyhawk Date: Tue, 9 Jun 2026 22:50:50 +0800 Subject: [PATCH] feat: enhance location message formatting with HTML for better visibility --- src/routes/+page.svelte | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 2df0330..c5b56ae 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -430,7 +430,7 @@ async function selectBusStop(stop, loadArrivals = false) { selectedStop = stop; - locationMessage = `Selected stop: ${stop.description} (${stop.code})`; + locationMessage = `Selected stop: ${escapeHtml(stop.description)} (${stop.code})`; await updateMap(); if (loadArrivals) { await runArrival(); @@ -444,7 +444,7 @@ throw new Error("No nearby bus stop found."); } - locationMessage = `Nearest stop found: ${selectedStop.description} (${selectedStop.code}). Tap another stop in the list or map.`; + locationMessage = `Nearest stop found: ${escapeHtml(selectedStop.description)} (${selectedStop.code}). Tap another stop in the list or map.`; await updateMap(); setStatus("Location Ready", "ok"); @@ -543,7 +543,7 @@ {/if} {locating ? "Locating..." : "Use Current Location"} -

{locationMessage}

+

{@html locationMessage}