Skip to content

URI::InvalidURIError when passed characters outside ascii #127

Description

@madmax

When we pass some no ascii characters it will raise error with URI::InvalidURIError

example:

Model.new(url:"\u201C").valid?
ArgumentError: wrong number of arguments (given 3, expected 1..2)
from /Users/madmax/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/bundler/gems/rails-ba8d029e0c99/activemodel/lib/active_model/errors.rb:310:in `add'
Caused by URI::InvalidURIError: URI must be ascii only "\u201C"
from /Users/madmax/.rbenv/versions/3.1.0/lib/ruby/3.1.0/uri/rfc3986_parser.rb:21:in `split'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions