From 90073d1fa61f5ac3f033dc6aab351b9add40dcaf Mon Sep 17 00:00:00 2001 From: Michael Vrable Date: Thu, 26 Jul 2007 18:01:01 -0700 Subject: [PATCH] URI-escape the '@' character. Ensure that the '@' character is escaped in strings. This isn't necessary now, but in the future this might be useful so that indirect references are never ambiguous. (If a "@" appears, it's an indirect reference; if a literal "@" is needed, it is escaped.) --- util.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util.cc b/util.cc index c1b5f41..13ad991 100644 --- a/util.cc +++ b/util.cc @@ -27,7 +27,7 @@ string uri_encode(const string &in) for (size_t i = 0; i < in.length(); i++) { unsigned char c = in[i]; - if (c >= '+' && c < 0x7f) { + if (c >= '+' && c < 0x7f && c != '@') { out += c; } else { char buf[4]; -- 2.20.1