properly encode resource url
made extensible by making features protected