etree: add support for url-encoding

Change-Id: I8e0395b6495e46605a77f38a583d62cf9ad62f84