URL opening fixes

Fixed single-quote escaping, tested, should solve #265