Reverting PR #51.
We should try to switch to filter_var in 2.x