Escape the url before opening. Moved url open to a separate method.
Merge pull request #1 from kaizer/master

Escape url before opening.