diff options
author | Wuzzy <almikes@aol.com> | 2016-08-06 17:23:46 +0200 |
---|---|---|
committer | Wuzzy <almikes@aol.com> | 2016-08-06 17:23:46 +0200 |
commit | c81666694587dc49936eb2122607de1efd1589fd (patch) | |
tree | 4d78acae78e081f30b8aa8d1076a1ecf5a27175f /init.lua | |
parent | 534c7bd92c663e08f96523e1c352f0b851622cc7 (diff) |
Ensure formspec escaping for translated strings
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -2,6 +2,7 @@ local modpath = minetest.get_modpath(minetest.get_current_modname()) local worldpath = minetest.get_worldpath() +local mygettext = rawget(_G, "intllib") and intllib.Getter() or function(s) return s end -- Data tables definitions unified_inventory = { @@ -31,7 +32,8 @@ unified_inventory = { default = "craft", -- intllib - gettext = rawget(_G, "intllib") and intllib.Getter() or function(s) return s end, + gettext = mygettext, + fgettext = function(s) return minetest.formspec_escape(mygettext(s)) end, -- "Lite" mode lite_mode = minetest.setting_getbool("unified_inventory_lite"), |