Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Update url_generator.rb #2676

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/paperclip/url_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ def escape_url(url)
if url.respond_to?(:escape)
url.escape
else
URI.escape(url).gsub(escape_regex){|m| "%#{m.ord.to_s(16).upcase}" }
URI.encode_www_form_component(url).gsub(escape_regex) {
Copy link

Choose a reason for hiding this comment

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

Style/BlockDelimiters: Avoid using {...} for multi-line blocks.
Layout/TrailingWhitespace: Trailing whitespace detected.

|m| "%#{m.ord.to_s(16).upcase}"
iqre8 marked this conversation as resolved.
Show resolved Hide resolved
}
end
end

Expand Down