Просмотр исходного кода

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>
rugk 5 месяцев назад
Родитель
Сommit
a4ca27d9a3
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      js/privatebin.js

+ 1 - 1
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,
                     '<a href="$1" rel="nofollow noopener noreferrer">$1</a>'
                 ),
                 purifyHtmlConfigStrictSubset