added quoting for blizzard name queries
This commit is contained in:
@@ -757,7 +757,7 @@ function private.get_form()
|
|||||||
query_string = query_string == '' and part or query_string..'/'..part
|
query_string = query_string == '' and part or query_string..'/'..part
|
||||||
end
|
end
|
||||||
|
|
||||||
add(m.name_input:GetText())
|
add('"'..m.name_input:GetText()..'"')
|
||||||
|
|
||||||
if m.exact_checkbox:GetChecked() then
|
if m.exact_checkbox:GetChecked() then
|
||||||
add('exact')
|
add('exact')
|
||||||
@@ -807,7 +807,11 @@ function private.set_form(components)
|
|||||||
|
|
||||||
for _, filter in components.blizzard do
|
for _, filter in components.blizzard do
|
||||||
if filter[1] == 'name' then
|
if filter[1] == 'name' then
|
||||||
m.name_input:SetText(filter[2])
|
local name = filter[2]
|
||||||
|
if name and strsub(name, 1, 1) == '"' and strsub(name, -1, -1) == '"' then
|
||||||
|
name = strsub(name, 2, -2)
|
||||||
|
end
|
||||||
|
m.name_input:SetText(name)
|
||||||
elseif filter[1] == 'exact' then
|
elseif filter[1] == 'exact' then
|
||||||
m.exact_checkbox:SetChecked(true)
|
m.exact_checkbox:SetChecked(true)
|
||||||
elseif filter[1] == 'min_level' then
|
elseif filter[1] == 'min_level' then
|
||||||
|
|||||||
+5
-1
@@ -628,7 +628,11 @@ function private.blizzard_query(components)
|
|||||||
filters[filter[1]] = filter[2] or true
|
filters[filter[1]] = filter[2] or true
|
||||||
end
|
end
|
||||||
|
|
||||||
local query = { name=filters.name }
|
local name = filters.name
|
||||||
|
if name and strsub(name, 1, 1) == '"' and strsub(name, -1, -1) == '"' then
|
||||||
|
name = strsub(name, 2, -2)
|
||||||
|
end
|
||||||
|
local query = { name=name }
|
||||||
|
|
||||||
local item_info, class_index, subclass_index, slot_index
|
local item_info, class_index, subclass_index, slot_index
|
||||||
if filters.exact then
|
if filters.exact then
|
||||||
|
|||||||
Reference in New Issue
Block a user