Fixing invalid characters restrictions for URLs

Fixes johndyer/mediaelemen#858