Quick fix by adding encodeURIComponent().
Merge pull request #1287 from owncloud/backport_913

Backport #913