mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Merge pull request #3607 from tgxworld/fix_%_in_url
FIX: Encode percent character in search terms.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import RestAdapter from 'discourse/adapters/rest';
|
||||
|
||||
function finderFor(filter, params) {
|
||||
export function finderFor(filter, params) {
|
||||
return function() {
|
||||
let url = Discourse.getURL("/") + filter + ".json";
|
||||
|
||||
@@ -9,7 +9,7 @@ function finderFor(filter, params) {
|
||||
encoded = [];
|
||||
|
||||
keys.forEach(function(p) {
|
||||
const value = params[p];
|
||||
const value = encodeURI(params[p]);
|
||||
if (typeof value !== 'undefined') {
|
||||
encoded.push(p + "=" + value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user