Add links for non-tls URLs, too

main
Chandler Swift 2024-03-12 00:09:48 -05:00
parent 9b48d1c782
commit 52a2ce3838
Signed by: chandlerswift
GPG Key ID: A851D929D52FB93F
1 changed files with 1 additions and 1 deletions

View File

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