s/resize/erase/ in URL encoding

* string::erase() is slightly faster than string::resize() when it's
  used to shrink the string.

Change-Id: Ie997641d2444da4c762196d7b5431aa0b94f758d
Signed-off-by: Kefu Chai <chaik@mozy.com>
Reviewed-on: https://gerrit.dechocorp.com/63665
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Kevin Cai <kevinc@mozy.com>
Reviewed-by: Andrew Skowronski <andrews@mozy.com>
fixes #118651: throws if XML end tag does not match

Change-Id: Ie3c6842b3b8c01efcb459dfbe0a0b9e820954a65
Signed-off-by: Kefu Chai <chaik@mozy.com>
Reviewed-on: https://gerrit.dechocorp.com/64095
Reviewed-by: Jenkins <hudsonbuild@mozy.com>
Reviewed-by: Kevin Cai <kevinc@mozy.com>