Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.

Conversation

Mojirade18
Copy link

🔧 Fix: Validate Extracted URLs

Description
This PR adds validation for extracted URLs before saving them. The main goals are:

  • Prevent broken links from being stored.
  • Avoid security risks from javascript: and other invalid URLs.
  • Improve reliability of collected leads.

Changes Made

  • Added a URL validation function.
  • Filtered out invalid URLs (null, undefined, javascript:, malformed links).
  • Updated the extraction logic to ensure only valid URLs are included.

Testing

  • Extracted leads from multiple pages with a mix of valid and invalid links.
  • Confirmed that broken or malicious URLs are excluded.
  • Verified that the extension still collects correct leads as expected.

Related Issue
Closes #5 (Unvalidated URLs issue).

Checklist

  • Code follows project guidelines.
  • Tests performed successfully.
  • Documentation updated if necessary.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create issue template
1 participant