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.