Better sanitize values

https://hackerone.com/reports/24185