web: clickable links in terminal rows and dashboard messages (issue #233)

This commit is contained in:
iris 2026-05-22 01:06:23 +02:00
parent 4b51c198d5
commit 15e44955a8
5 changed files with 82 additions and 8 deletions

View file

@ -755,6 +755,12 @@
try {
marked.setOptions({ breaks: true, gfm: true });
div.innerHTML = marked.parse(src);
// marked autolinks URLs but leaves them same-tab — open them
// externally so a click never unloads the terminal. (issue #233)
div.querySelectorAll('a[href]').forEach((a) => {
a.target = '_blank';
a.rel = 'noopener noreferrer';
});
} catch (err) {
console.warn('marked failed', err);
div.textContent = src;