escape strings
parent
9f6bc70e7b
commit
13d3a5d305
|
@ -22,7 +22,7 @@ minetest.register_chatcommand("mp", {
|
|||
return false, minetest.colorize(x_marketplace.colors.red, "MARKET PLACE: You need to write the item name you want to find. example: /mp find default:stone. See some suggestion from the store: ")..x_marketplace.store_get_random()
|
||||
end
|
||||
|
||||
local items = x_marketplace.store_find(params[2])
|
||||
local items = x_marketplace.store_find(minetest.formspec_escape(params[2]))
|
||||
|
||||
if not items then
|
||||
return false, minetest.colorize(x_marketplace.colors.yellow, "MARKET PLACE: Oops there is no item like this in the store. Check out other items in the store: ")..x_marketplace.store_get_random()
|
||||
|
@ -353,7 +353,7 @@ minetest.register_chatcommand("mp", {
|
|||
|
||||
-- item not in store
|
||||
if not x_marketplace.store_list[params[2]] then
|
||||
local suggestions = x_marketplace.store_find(params[2])
|
||||
local suggestions = x_marketplace.store_find(minetest.formspec_escape(params[2]))
|
||||
|
||||
-- try suggest item from store, else show random items
|
||||
if suggestions then
|
||||
|
|
Loading…
Reference in New Issue