From a4ca27d9a36a390bca7f3846a8451fe113f96f2a Mon Sep 17 00:00:00 2001 From: rugk Date: Thu, 26 Feb 2026 17:57:04 +0100 Subject: [PATCH] Potential fix for pull request finding 'Duplicate character in character class' Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> --- js/privatebin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/privatebin.js b/js/privatebin.js index d4566763..96d90899 100644 --- a/js/privatebin.js +++ b/js/privatebin.js @@ -458,7 +458,7 @@ window.PrivateBin = (function() { const raw = element.innerHTML; element.innerHTML = DOMPurify.sanitize( raw.replace( - /(((https?|ftp):\/\/[\w?!=&.\/;#@~%+*-]+(?![\w\s?!&.\/;#~%"=-]>))|((magnet):[\w?=&.\/\-;#@~%+*-]+))/ig, + /(((https?|ftp):\/\/[\w?!=&.\/;#@~%+*-]+(?![\w\s?!&.\/;#~%"=-]>))|((magnet):[\w?=&.\/;#@~%+*-]+))/ig, '$1' ), purifyHtmlConfigStrictSubset