Skip to content

Conversation

@goulvench
Copy link

Warning: this allows a lot more URLs.
There is not valid? method on Addressable::URI, because many strings can be parsed and considered valid.
See twingly/twingly-url#74 (comment)
This change requires a minor version bump, along with a bundle install warning I think.

@goulvench goulvench changed the title Validate URLs using Addressable gem to allow non-ascii characters Validate URLs using Addressable gem to allow non-ascii characters (Fixes #111) Mar 19, 2022
@goulvench goulvench changed the title Validate URLs using Addressable gem to allow non-ascii characters (Fixes #111) Validate URLs using Addressable gem to allow non-ascii characters (closes #111) Mar 19, 2022
describe "for invalid urls" do
it "rejects invalid urls" do
subject = build_url_record
subject.url = 'http://^^^^.fr'
Copy link
Author

Choose a reason for hiding this comment

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

http://^^^^.fr is considered valid by Addressable, which strictly adheres to the RFC. Spaces are not allowed though.

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