oulu
oulu copied to clipboard
Spaces in shared URLS/uploaded files not converted to %20
When files are uploaded to a flow, the URL sent via IRC isn't properly URL-encoded. Specifically, spaces aren't converted to %20. This gives things like this:
<RandomPerson> https://www.flowdock.com/rest/files/81438/n3ISn0DBwkVhTkTYGm_nQQ/Screenshot 2015-01-15 13.26.33.png
which are unclickable in most IRC clients. It should instead be
<RandomPerson> https://www.flowdock.com/rest/files/81438/n3ISn0DBwkVhTkTYGm_nQQ/Screenshot%202015-01-15%2013.26.33.png
Looks like the culprit is here:
https://github.com/flowdock/oulu/blob/ff98112e4aaf8a2aee48a065323f29d349e8c73b/lib/events/file_event.rb#L6
Just need to properly URI escape the contents of @message['content']['path']
, right?