We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d754380 commit e634a68Copy full SHA for e634a68
app/controller/search.js
@@ -5,7 +5,9 @@ const Controller = require('egg').Controller;
5
class SearchController extends Controller {
6
async index() {
7
let q = this.ctx.query.q;
8
- q = encodeURIComponent(q);
+ if (this.config.search !== 'local') {
9
+ q = encodeURIComponent(q);
10
+ }
11
if (q.length === 0) {
12
return this.ctx.redirect('/');
13
}
0 commit comments