SOLR-8596: Split UIs RAW query params only on first equal sign

This commit is contained in:
Jan Høydahl 2016-07-27 10:02:00 +10:00
parent bc29a3d7ed
commit c9935b4788
2 changed files with 8 additions and 3 deletions

View File

@ -165,6 +165,7 @@ Bug Fixes
* SOLR-9339: NPE in CloudSolrClient when the response is null (noble) * SOLR-9339: NPE in CloudSolrClient when the response is null (noble)
* SOLR-8596: Web UI doesn't correctly generate queries which include local parameters (Alexandre Rafalovitch, janhoy)
Optimizations Optimizations
---------------------- ----------------------

View File

@ -61,9 +61,13 @@ solrAdminApp.controller('QueryController',
if ($scope.rawParams) { if ($scope.rawParams) {
var rawParams = $scope.rawParams.split(/[&\n]/); var rawParams = $scope.rawParams.split(/[&\n]/);
for (var i in rawParams) { for (var i in rawParams) {
var param = rawParams[i]; var param = rawParams[i];
var parts = param.split("="); var equalPos = param.indexOf("=");
set(parts[0], parts[1]); if (equalPos > -1) {
set(param.substring(0, equalPos), param.substring(equalPos+1));
} else {
set(param, ""); // Use empty value for params without "="
}
} }
} }