Skip to content

Commit

Permalink
Rails8: remove URI.parse (#1249)
Browse files Browse the repository at this point in the history
turns out this wasn't necessary
  • Loading branch information
mockdeep authored Nov 29, 2024
1 parent c7a8c66 commit c6719dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/helpers/url_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def expand_absolute_urls(content, base_url)
url = node.get_attribute(attr)
next if url =~ URI::RFC2396_PARSER.regexp[:ABS_URI]

node.set_attribute(attr, URI.join(URI.parse(base_url), url).to_s)
node.set_attribute(attr, URI.join(base_url, url).to_s)
rescue URI::InvalidURIError
# Just ignore. If we cannot parse the url, we don't want the entire
# import to blow up.
Expand Down

0 comments on commit c6719dc

Please sign in to comment.