aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorpracticalswift <practicalswift@users.noreply.github.com>2018-11-01 17:03:32 +0100
committerpracticalswift <practicalswift@users.noreply.github.com>2018-11-05 13:27:04 +0100
commitab8c6f24d28ea1d1e6258cf316b4b97a0baf2377 (patch)
tree7fa4264d592abc9f2831f0e3d2e8746d371375be /src/util
parent991248649b76a5a071e1360a700f3e2ecf3e1e1f (diff)
downloadbitcoin-ab8c6f24d28ea1d1e6258cf316b4b97a0baf2377.tar.xz
Add SAFE_CHARS[SAFE_CHARS_URI]: Chars allowed in URIs (RFC 3986)
Diffstat (limited to 'src/util')
-rw-r--r--src/util/strencodings.cpp1
-rw-r--r--src/util/strencodings.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/util/strencodings.cpp b/src/util/strencodings.cpp
index 5b8520030b..2a2df43337 100644
--- a/src/util/strencodings.cpp
+++ b/src/util/strencodings.cpp
@@ -20,6 +20,7 @@ static const std::string SAFE_CHARS[] =
CHARS_ALPHA_NUM + " .,;-_/:?@()", // SAFE_CHARS_DEFAULT
CHARS_ALPHA_NUM + " .,;-_?@", // SAFE_CHARS_UA_COMMENT
CHARS_ALPHA_NUM + ".-_", // SAFE_CHARS_FILENAME
+ CHARS_ALPHA_NUM + "!*'();:@&=+$,/?#[]-_.~%", // SAFE_CHARS_URI
};
std::string SanitizeString(const std::string& str, int rule)
diff --git a/src/util/strencodings.h b/src/util/strencodings.h
index 132071c61e..87ccf40a1b 100644
--- a/src/util/strencodings.h
+++ b/src/util/strencodings.h
@@ -25,6 +25,7 @@ enum SafeChars
SAFE_CHARS_DEFAULT, //!< The full set of allowed chars
SAFE_CHARS_UA_COMMENT, //!< BIP-0014 subset
SAFE_CHARS_FILENAME, //!< Chars allowed in filenames
+ SAFE_CHARS_URI, //!< Chars allowed in URIs (RFC 3986)
};
/**