encode URI before opening page