Skip to content

Commit 4edb663

Browse files
author
Paul van Brenk
committed
Url Encode the filter text for the NPM query
1 parent 87768f6 commit 4edb663

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Nodejs/Product/Npm/IPackageCatalog.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ public async Task<IEnumerable<IPackage>> GetCatalogPackagesAsync(string filterTe
5050

5151
// All exceptions thrown here and in the called methods are handled by the
5252
// NPM search dialog, so we don't have to do any exception handling here.
53-
54-
var relativeUri = string.Format("/-/v1/search?text={0}", filterText);
53+
var relativeUri = string.Format("/-/v1/search?text={0}", WebUtility.UrlEncode(filterText));
5554
var searchUri = new Uri(defaultRegistryUri, relativeUri);
5655

5756
var request = WebRequest.Create(searchUri);

0 commit comments

Comments
 (0)