Skip to content

handle invalid and valid url#33

Closed
Ravindrayadav04 wants to merge 8 commits intodevelopfrom
feature/RTY-32-260032-handle-invalid-and-valid-url
Closed

handle invalid and valid url#33
Ravindrayadav04 wants to merge 8 commits intodevelopfrom
feature/RTY-32-260032-handle-invalid-and-valid-url

Conversation

@Ravindrayadav04
Copy link
Collaborator

Pull Request Template

Description

Fix the issue that valid url is not generated if they have different parameter then global

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • Test B

Test Configuration:

  • Browser:
  • Device:
  • Toolchain:

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

@Ravindrayadav04 Ravindrayadav04 self-assigned this Mar 7, 2026
@Ravindrayadav04 Ravindrayadav04 added the feature New feature label Mar 7, 2026
@recursivezero
Copy link
Owner

⚠️ Automation Note: Failed to link this to Project #5 with status 'In Progress'. Please check Action logs.

Copy link
Owner

@recursivezero recursivezero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename Branch and follow the same syntax as suggsted.

return False


# def sanitize_url(url: str) -> str:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove commented code if it is not useful


if not original_url or not is_valid_url(original_url):
if not original_url.startswith(("http://", "https://")):
if re.match(r"^[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+){1,2}$", original_url):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is incorrect approach; create separate method and use that.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sir if i romve this then if anyone type like https://kdkfjclkdclkd.....it will pass and generate qr ...because it is syntactically valid. ...if u told i will remove it and check only valid urls.

if not original_url or not is_valid_url(original_url):
if not original_url.startswith(("http://", "https://")):
if re.match(r"^[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+){1,2}$", original_url):
original_url = "https://" + original_url
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do you add https by yourself?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if i don't add this ...then the url like google.com which is valid ,but can't show it as a valid
that's why i add this

@Ravindrayadav04 Ravindrayadav04 deleted the feature/RTY-32-260032-handle-invalid-and-valid-url branch March 8, 2026 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants