#821: Referrer check breaks with UTF-8 URLs


![1](https://f.cloud.github.com/assets/959078/943991/37067340-028c-11e3-8956-8847b69eb46a.png)
![2](https://f.cloud.github.com/assets/959078/943992/37097ed2-028c-11e3-9bc3-3ed5b9756eb0.png)

I tried to do as simple as possible. Let me know what you think.