Skip to content

Commit 7f48ae7

Browse files
authored
Merge pull request #1567 from paulvanbrenk/urlEncodeNpmQuery
Url encode npm query
2 parents 6c8560f + 4edb663 commit 7f48ae7

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

Nodejs/Product/Nodejs/ProjectTemplates/CloudService/CloudService.vstemplate

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@
2727
<Assembly>Microsoft.NodejsTools.ProjectWizard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</Assembly>
2828
<FullClassName>Microsoft.NodejsTools.ProjectWizard.CloudServiceWizard</FullClassName>
2929
</WizardExtension>
30-
</VSTemplate>
30+
</VSTemplate>

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)