Escape more symbols in path handling.

This commit is contained in:
Peter Elmers 2017-12-07 17:26:09 -08:00 committed by Jacob Dufault
parent 479c0c59bc
commit 177e4cd224

View File

@ -223,9 +223,13 @@ void lsDocumentUri::SetPath(const std::string& path) {
"%3A");
}
// subset of reserved characters from the URI standard
// http://www.ecma-international.org/ecma-262/6.0/#sec-uri-syntax-and-semantics
raw_uri = ReplaceAll(raw_uri, " ", "%20");
raw_uri = ReplaceAll(raw_uri, "(", "%28");
raw_uri = ReplaceAll(raw_uri, ")", "%29");
raw_uri = ReplaceAll(raw_uri, "#", "%23");
raw_uri = ReplaceAll(raw_uri, ",", "%2C");
// TODO: proper fix
#if defined(_WIN32)