diff --git a/searchPages/searchUtils/searchPage.component.ts b/searchPages/searchUtils/searchPage.component.ts index 552e1c74..43f1770a 100644 --- a/searchPages/searchUtils/searchPage.component.ts +++ b/searchPages/searchUtils/searchPage.component.ts @@ -147,16 +147,16 @@ export class SearchPageComponent { countvalues++; var paramId = this.fieldIdsMap[filterId].param; // parameters+='&' + paramId+ '='+ value;//+"&" + this.fieldIdsMap[paramId].operator + "="+((countvalues == 1)?"and":"or"); - fq+=(fq.length > 0 ? " " + "or" + " ":"" ) + filterId +" exact " +StringUtils.URIEncode(value); + fq+=(fq.length > 0 ? " " + "or" + " ":"" ) + filterId +" exact " +(value); } if(countvalues > 0){ - fq="&fq="+fq; + fq="&fq="+StringUtils.URIEncode(fq); } allFqs += fq; } } if(this.connectCommunityId ){ - allFqs+= "&fq=communityId exact " + StringUtils.quote(StringUtils.URIEncode(this.connectCommunityId )); + allFqs+= "&fq="+StringUtils.URIEncode("communityId exact " + StringUtils.quote((this.connectCommunityId ))); } var keyword = params['keyword']; @@ -200,14 +200,14 @@ export class SearchPageComponent { } // parameters+= " ) "; if(countvalues > 0){ - fq="&fq="+fq; + fq="&fq="+StringUtils.URIEncode(fq); } allFqs += fq; } } if(this.connectCommunityId ){ - allFqs+= "&fq=communityId exact " + StringUtils.quote(StringUtils.URIEncode(this.connectCommunityId )); + allFqs+= "&fq="+StringUtils.URIEncode("communityId exact " + StringUtils.quote(this.connectCommunityId )); } var keyword = params['keyword']; var doiQuery = ""; @@ -332,7 +332,7 @@ export class SearchPageComponent { if(filter.countSelectedValues > 0 ){//|| (this.connectCommunityId && filter.filterId.indexOf("community")!=-1)){ for (let value of filter.values){ if(value.selected == true){ - filterLimits+=((filterLimits.length == 0)?'':',') +'"'+ StringUtils.URIEncode(value.id)+'"'; + filterLimits+=((filterLimits.length == 0)?'':',') +'"'+ (value.id)+'"'; } } // if(this.connectCommunityId && filter.filterId.indexOf("community")!=-1 ){ @@ -369,19 +369,19 @@ export class SearchPageComponent { for (let value of filter.values){ if(value.selected == true){ count_selected++; - fq+=(fq.length > 0 ? " " + filter.filterOperator + " ":"" ) + filter.filterId + " exact " + StringUtils.quote(StringUtils.URIEncode(value.id)); + fq+=(fq.length > 0 ? " " + filter.filterOperator + " ":"" ) + filter.filterId + " exact " + StringUtils.quote((value.id)); } } // if(this.connectCommunityId && filter.filterId.indexOf("community")!=-1){ // count_selected++; // fq+=(fq.length > 0 ? " " + filter.filterOperator + " ":"" ) + filter.filterId + " exact " + StringUtils.quote(StringUtils.URIEncode(this.connectCommunityId)); // } - fq="&fq="+fq; + fq="&fq="+StringUtils.URIEncode(fq); allFqs += fq; } } if(this.connectCommunityId ){ - allFqs+= "&fq=communityId exact " + StringUtils.quote(StringUtils.URIEncode(this.connectCommunityId )); + allFqs+= "&fq="+StringUtils.URIEncode("communityId exact " + StringUtils.quote(this.connectCommunityId )); } //TODO -- var doiQuery = ""; @@ -415,11 +415,11 @@ export class SearchPageComponent { for (let value of filter.values){ if(value.selected == true){ count_selected++; - fq+=(fq.length > 0 ? " " + filter.filterOperator + " ":"" ) + filter.filterId + " exact " + StringUtils.quote(StringUtils.URIEncode(value.id)); + fq+=(fq.length > 0 ? " " + filter.filterOperator + " ":"" ) + filter.filterId + " exact " + (StringUtils.URIEncode(value.id)); } } if(count_selected > 0){ - fq="&fq="+fq; + fq="&fq="+StringUtils.URIEncode(fq); allFqs += fq; } }