Skip to content

fix: avoid false jQuery detection on Fancybox and similar script URLs#243

Open
orlove wants to merge 1 commit intoenthec:mainfrom
orlove:fix/jquery-regex-fancybox-false-positive
Open

fix: avoid false jQuery detection on Fancybox and similar script URLs#243
orlove wants to merge 1 commit intoenthec:mainfrom
orlove:fix/jquery-regex-fancybox-false-positive

Conversation

@orlove
Copy link
Copy Markdown

@orlove orlove commented Mar 26, 2026

Problem

The previous patterns could match CDN URLs such as:

https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.3.5/jquery.fancybox.min.js

Those files are not the jQuery core library, but the detector still attributed jQuery based on scriptSrc alone.

Solution

  • Refined the versioned scriptSrc regex so paths like jquery.fancybox… (and the existing jquery.popupoverlay case) are excluded via a negative lookahead, while normal jQuery core URLs (e.g. …/3.6.0/jquery.min.js) continue to match and expose the version when possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant