aboutsummaryrefslogtreecommitdiffstats
path: root/js
diff options
context:
space:
mode:
authorFeuerfuchs <git@feuerfuchs.dev>2019-06-26 20:48:52 +0200
committerFeuerfuchs <git@feuerfuchs.dev>2019-06-26 20:48:52 +0200
commitc2cca93c45e077a1331553b42e3654e37ae81fd5 (patch)
tree8057b5ba6beb0e6ad356cbc426e200eeb8929b32 /js
parentFix URL/mail regex for newer TLDs (.space etc) (diff)
downloadgopherproxy-c2cca93c45e077a1331553b42e3654e37ae81fd5.tar.gz
gopherproxy-c2cca93c45e077a1331553b42e3654e37ae81fd5.tar.bz2
gopherproxy-c2cca93c45e077a1331553b42e3654e37ae81fd5.zip
Fix URL regex for ending slashes
Diffstat (limited to 'js')
-rw-r--r--js/main.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/js/main.ts b/js/main.ts
index 12f92ab..b099496 100644
--- a/js/main.ts
+++ b/js/main.ts
@@ -254,7 +254,7 @@ function generateMarkupForPlainLinks() {
254 } 254 }
255 255
256 const contentEl = document.getElementsByClassName('content')[0]; 256 const contentEl = document.getElementsByClassName('content')[0];
257 const urlRegex = /\b([a-z]*:\/\/[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,}\b[-a-zA-Z0-9@:%_\+.~#?&//=]*)\b/g; 257 const urlRegex = /\b([a-z]*:\/\/[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,}\b[-a-zA-Z0-9@:%_\+.~#?&//=]*)/g;
258 const mailRegex = /\bmailto:[-a-zA-Z0-9@:%._\+~#=]+@(?:[-a-zA-Z0-9@:%._\+~#=]+\.)+[a-z]{2,}\b/g; 258 const mailRegex = /\bmailto:[-a-zA-Z0-9@:%._\+~#=]+@(?:[-a-zA-Z0-9@:%._\+~#=]+\.)+[a-z]{2,}\b/g;
259 259
260 contentEl.innerHTML = contentEl.innerHTML.replace(urlRegex, match => { 260 contentEl.innerHTML = contentEl.innerHTML.replace(urlRegex, match => {