Sanitize user input.
Merge pull request #439 from protich/issue/438

Sanitize user input.