瀏覽代碼

[fix] searching for "!google_images text" doesn't work (bang with underscore)

Alexandre Flament 7 年之前
父節點
當前提交
448903cd4a
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. 1
    1
      searx/query.py

+ 1
- 1
searx/query.py 查看文件

@@ -95,7 +95,7 @@ class RawTextQuery(object):
95 95
 
96 96
             # this force a engine or category
97 97
             if query_part[0] == '!' or query_part[0] == '?':
98
-                prefix = query_part[1:].replace('-', ' ')
98
+                prefix = query_part[1:].replace('-', ' ').replace('_', ' ')
99 99
 
100 100
                 # check if prefix is equal with engine shortcut
101 101
                 if prefix in engine_shortcuts: