From cc8c200da08a4d1858d46ee4ecefcba716012ef0 Mon Sep 17 00:00:00 2001 From: Eugene Pankov Date: Fri, 28 Jan 2022 23:49:38 +0100 Subject: [PATCH] updated linkifier regex - fixes #5611 --- tabby-linkifier/src/handlers.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tabby-linkifier/src/handlers.ts b/tabby-linkifier/src/handlers.ts index de9f419d..009c8945 100644 --- a/tabby-linkifier/src/handlers.ts +++ b/tabby-linkifier/src/handlers.ts @@ -11,7 +11,8 @@ import { LinkHandler } from './api' @Injectable() export class URLHandler extends LinkHandler { // From https://urlregex.com/ - regex = /((([A-Za-z]{3,9}:(?:\/\/)?)(?:[\-;:&=\+\$,\w]+@)?[A-Za-z0-9\.\-]+|(?:www\.|[\-;:&=\+\$,\w]+@)[A-Za-z0-9\.\-]+)((:((6553[0-5])|(655[0-2][0-9])|(65[0-4][0-9]{2})|(6[0-4][0-9]{3})|([1-5][0-9]{4})|([0-5]{1,5})|([0-9]{1,4})))?(?:\/[\+~%\/\.\w\-_]*)?\??(?:[\-\+=&;%@\.\w_]*)#?(?:[\.\!\/\\\w]*))?)/ + // with "-" added to last group (https://github.com/Eugeny/tabby/issues/5611) + regex = /((([A-Za-z]{3,9}:(?:\/\/)?)(?:[\-;:&=\+\$,\w]+@)?[A-Za-z0-9\.\-]+|(?:www\.|[\-;:&=\+\$,\w]+@)[A-Za-z0-9\.\-]+)((?:\/[\+~%\/\.\w\-_]*)?\??(?:[\-\+=&;%@\.\w_]*)#?(?:[\.\!\/\\\w-]*))?)/ priority = 5