Kaynağa Gözat

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 ay önce
ebeveyn
işleme
a4ca27d9a3
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1 1
      js/privatebin.js

+ 1 - 1
js/privatebin.js

@@ -458,7 +458,7 @@ window.PrivateBin = (function() {
             const raw = element.innerHTML;
             const raw = element.innerHTML;
             element.innerHTML = DOMPurify.sanitize(
             element.innerHTML = DOMPurify.sanitize(
                 raw.replace(
                 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>'
                     '<a href="$1" rel="nofollow noopener noreferrer">$1</a>'
                 ),
                 ),
                 purifyHtmlConfigStrictSubset
                 purifyHtmlConfigStrictSubset