Escape all the things.

Damnit, it's ashaming. Fixes #1475, #1532 & #1531
Merge branch 'master' of https://github.com/YOURLS/YOURLS