We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 369a79c commit 6c94aaeCopy full SHA for 6c94aae
src/lib/isMagnetURI.js
@@ -1,6 +1,6 @@
1
import assertString from './util/assertString';
2
3
-const magnetURIComponent = /[?&]xt(?:\.1)?=urn:((?:aich|bitprint|btih|ed2k|ed2khash|kzhash|md5|sha1|tree:tiger):[a-z0-9]{32}(?:[a-z0-9]{8})?|btmh:1220[a-z0-9]{64})($|&)/i;
+const magnetURIComponent = /(?:^magnet:\?|[^?&]&)xt(?:\.1)?=urn:(?:(?:aich|bitprint|btih|ed2k|ed2khash|kzhash|md5|sha1|tree:tiger):[a-z0-9]{32}(?:[a-z0-9]{8})?|btmh:1220[a-z0-9]{64})(?:$|&)/i;
4
5
export default function isMagnetURI(url) {
6
assertString(url);
0 commit comments