diff --git a/system/formspec/formspec_creation.lua b/system/formspec/formspec_creation.lua index f451170..8966c93 100644 --- a/system/formspec/formspec_creation.lua +++ b/system/formspec/formspec_creation.lua @@ -1,6 +1,7 @@ local m = mtimer local S = m.translator local build_frame = m.build_frame +local fe = minetest.formspec_escape mtimer.show_formspec.main_menu = function (player_name) @@ -105,7 +106,7 @@ mtimer.show_formspec.ingame_time_format = function (player_name) minetest.show_formspec(player_name, 'mtimer:ingame_time_format', build_frame(7, 4.9, S('Ingame Time Format'))..[[ field_close_on_enter[format;false] - field[0.25,0.75;7,1;format;;]]..time_data.format..[[] + field[0.25,0.75;7,1;format;;]]..fe(time_data.format)..[[] container[0,1.425] label[2.8,0;]]..S('Variable')..[[] @@ -132,7 +133,7 @@ mtimer.show_formspec.ingame_time_format = function (player_name) box[0,2.2;6.75,0.02;#ffffff] label[0,2.25;]]..S('Current Result')..[[] - label[2.8,2.25;]]..time_data.formatted..[[] + label[2.8,2.25;]]..fe(time_data.formatted)..[[] container_end[] ]]) end @@ -162,7 +163,7 @@ mtimer.show_formspec.session_duration_format = function (player_name) minetest.show_formspec(player_name, 'mtimer:session_duration_format', build_frame(7, 5, S('Session Duration Format'))..[[ field_close_on_enter[format;false] - field[0.25,0.75;7,1;format;;]]..time_data.format..[[] + field[0.25,0.75;7,1;format;;]]..fe(time_data.format)..[[] container[0,1.425] @@ -190,7 +191,7 @@ mtimer.show_formspec.session_duration_format = function (player_name) box[0,2.2;6.75,0.02;#ffffff] label[0,2.25;]]..S('Current Result')..[[] - label[2.5,2.25;]]..time_data.formatted..[[] + label[2.5,2.25;]]..fe(time_data.formatted)..[[] container_end[] ]]) diff --git a/system/formspec/real_time_universal.lua b/system/formspec/real_time_universal.lua index d8d9347..9f4cca7 100644 --- a/system/formspec/real_time_universal.lua +++ b/system/formspec/real_time_universal.lua @@ -1,6 +1,7 @@ local m = mtimer local S = m.translator local build_frame = m.build_frame +local fe = minetest.formspec_escape mtimer.show_formspec.real_time_universal = function (player_name, config) @@ -9,7 +10,7 @@ mtimer.show_formspec.real_time_universal = function (player_name, config) minetest.show_formspec(player_name, config.formspec_name, build_frame(7, 8.5, config.title)..[[ field_close_on_enter[format;false] - field[0.25,0.75;7,1;format;;]]..time_data.format..[[] + field[0.25,0.75;7,1;format;;]]..fe(time_data.format)..[[] container[0,1.425] label[2.8,0;]]..S('Variable')..[[] @@ -74,7 +75,7 @@ mtimer.show_formspec.real_time_universal = function (player_name, config) box[0,5.75;6.75,0.02;#ffffff] label[0,5.8;]]..S('Current Result')..[[] - label[2.8,5.8;]]..time_data.formatted..[[] + label[2.8,5.8;]]..fe(time_data.formatted)..[[] container_end[] ]])