encode the api-docs path properly to make Safari happy

fixes #307