From 33e0e573b10548f1e8243bad205134f72040aee6 Mon Sep 17 00:00:00 2001 From: Robert Fletcher Date: Fri, 29 Nov 2024 12:52:38 -0800 Subject: [PATCH] Rails8: remove URI.parse turns out this wasn't necessary --- app/helpers/url_helpers.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/url_helpers.rb b/app/helpers/url_helpers.rb index cdc5dcc35..a17ee89cd 100644 --- a/app/helpers/url_helpers.rb +++ b/app/helpers/url_helpers.rb @@ -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.