File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -76,15 +76,15 @@ def encode_block(state, buf)
76
76
# Plus characters ('+') in a uri are converted to spaces, so replace
77
77
# them with something that PHP will turn into a plus. Slashes cause
78
78
# parse errors on the server side, so do the same for them.
79
- b64 . gsub! ( '+' , ' .chr(43).' )
80
- b64 . gsub! ( '/' , ' .chr(47).' )
79
+ b64 . gsub! ( '+' , " #{ quote } .chr(43).#{ quote } " )
80
+ b64 . gsub! ( '/' , " #{ quote } .chr(47).#{ quote } " )
81
81
82
82
state . badchars . each_byte do |byte |
83
83
# Last ditch effort, if any of the normal characters used by base64
84
84
# are badchars, try to replace them with something that will become
85
85
# the appropriate thing on the other side.
86
86
if b64 . include? ( byte . chr )
87
- b64 . gsub! ( byte . chr , ".chr(#{ byte } )." )
87
+ b64 . gsub! ( byte . chr , "#{ quote } .chr(#{ byte } ).#{ quote } " )
88
88
end
89
89
end
90
90
You can’t perform that action at this time.
0 commit comments