zuinqstudio / redmine_drop_box

Redmine plugin to upload your documents to dropbox
Other
22 stars 7 forks source link

Couldn't use multi-byte language for title. #1

Closed matsukaz closed 13 years ago

matsukaz commented 13 years ago

Hi, thanks for you wonderful plugin!

Our team members are all Japanese, and I had a problem using plugin. When I input mylti-byte language for title, error has occurred.

I've fixed this problem by editing the code like bellow.

--- lib/dropbox/lib/dropbox.rb
+++ lib/dropbox/lib/dropbox.rb.new
@@ -214,7 +214,7 @@

     def build_url(host, port, url, params=nil)
         port = port == 80 ? nil : port
 -        versioned_url = "/#{API_VERSION}#{url}"
+        versioned_url = URI.escape("/#{API_VERSION}#{url}")

         target = URI::Generic.new("http", nil, host, port, nil, versioned_url, nil, nil, nil)

Hope this helps someone who wants to use multi-byte language like me :)

zuinqstudio commented 13 years ago

Thanks!