Add links for non-tls URLs, too

This commit is contained in:
Chandler Swift 2024-03-12 00:09:48 -05:00
parent 9b48d1c782
commit 52a2ce3838
Signed by: chandlerswift
GPG key ID: A851D929D52FB93F

View file

@ -140,7 +140,7 @@ function objectToTable(o) {
if (typeof value === "object") { if (typeof value === "object") {
value = objectToTable(value); value = objectToTable(value);
} }
if (typeof value === "string" && value.startsWith('https://')) { if (typeof value === "string" && /^https?:\/\//.test(value)) {
value = `<a href="${value}">${value}</a>` value = `<a href="${value}">${value}</a>`
} }
table += `<tr><td style="border: 1px solid;">${key}</td><td style="border: 1px solid;">${value}</td></tr>`; table += `<tr><td style="border: 1px solid;">${key}</td><td style="border: 1px solid;">${value}</td></tr>`;