Escape tildes in URLs (to avoid misinterpretation as subscript).